John Baird
Coatesville, Pennsylvania, United States
>>>>>I created an application that does file exports and imports. These files have a specific extension. I want to be able to click on one of these data files and have the application launch and automatically import it. Can somebody point me in the right direction?
>>>>
>>>>Hi Mike,
>>>>
>>>>We use the filesystemwatcher class to poll a directory, when a file is placed there by the user, it automatically runs the code to import.
>>>
>>>I'm sorry, I must have not described my question correctly. Reading it again, I could have really simplified it.
>>>
>>>What I want to do is create an application that has data files of a specific extension, and when I open the data files it launches the application and loads the data. For example, when I click on a .doc file it launches Word and loads the document. I know I can make files of that extension open with my application, but I don't know how to load the data.
>>
>>You have to associate the program to handle that extension with the extension. Open any folder, go to tools/folder options/file types and register the action there. It should work. Thinking about it, you could probably write the registry keys yourself to register your file / type programatically.
>
>How do I detect in my application that it was opened with a datafile, instead of opened without one?
Read the args line in main and test for count > 0....
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only