E
Elmo Watson
I have set the file association for Text files with my application - now
what I'd like to do is to double click on a text file, and have it actually
load in my application.
Right now - all that happens when I double click on the file is that it runs
my application, but the file I double clicked on is not loaded.
1. The default icon never changes for Text Files
2. When I go in, with Regedit, to look at what this put in, for this:
Registry.SetValue(HKEY_CLASSES_ROOT, "My App\\\\shell\\\\open\\\\command",
"", SessionVar.Expand("%AppFolder%\\\\MyApp.exe\\\"%1\""), REG_SZ);
I get:
c:\Program Files\myFolder\\My app.exe\"%1"
isn't it supposed to be a 1 surrounded by percent (%1%)?, and more like:
c:\Program Files\myFolder\My app.exe %1%
3. HKEY_CLASSES_ROOT\TxtFile never gets changed from Notepad - I change that
designation to my application, and at least it will open my application, but
it won't load the file into my application
I've gotten this stuff from the knowledgebase, and from indigo rose posts
concerning it - -
Can someone please give me a definitive section of code to get this done?
what I'd like to do is to double click on a text file, and have it actually
load in my application.
Right now - all that happens when I double click on the file is that it runs
my application, but the file I double clicked on is not loaded.
1. The default icon never changes for Text Files
2. When I go in, with Regedit, to look at what this put in, for this:
Registry.SetValue(HKEY_CLASSES_ROOT, "My App\\\\shell\\\\open\\\\command",
"", SessionVar.Expand("%AppFolder%\\\\MyApp.exe\\\"%1\""), REG_SZ);
I get:
c:\Program Files\myFolder\\My app.exe\"%1"
isn't it supposed to be a 1 surrounded by percent (%1%)?, and more like:
c:\Program Files\myFolder\My app.exe %1%
3. HKEY_CLASSES_ROOT\TxtFile never gets changed from Notepad - I change that
designation to my application, and at least it will open my application, but
it won't load the file into my application
I've gotten this stuff from the knowledgebase, and from indigo rose posts
concerning it - -
Can someone please give me a definitive section of code to get this done?