For any of you C# coders, I'm not a professional coder. I just like to write a few programs in my spare time. In one of these applications, I have data files written to disk by the application using Csharp's serialization. I give these binary files an unusual (and supposedly unique) extension, namely *.crf
Now, I'll tell you what I have been able to do, and what I'd like to be able to do...
I can, of course, open one of these files from within the program, using a file-open dialogue. Also, I can drag and drop one of these data files onto either the executable itself, or a shortcut thereof, and the program launches and opens the file. All well and good. What I don't know how to do (and spent many hours trying to figure out some months ago) is this: I want to be able to right click on the data file, then click on "Open" in the popup context menu, and have the operating system recognize that it needs to launch my application to open the file.
Now... I know how to do this by manually adding a file type in Windows. But I need to know how to create this association programmatically. Any pointers will be most appreciated. I've been given sample code before, but was unable to get the sample project to work, or get the code snippet to work in my own app.