how to force that any file of a certain type will open with my program?
i have build program that can open *.sdf files and show all the table & the data.
how to force that any *.sdf file in my computer will o开发者_开发知识库pen with my program ?
thank's in advance
You can not. You can associate your program with a specific file extension, but you can not FORCE the user to use your program to open a file. Even registration entries are easy to change (open with in the context menu).
If you have a Deployment project for your program it is easy to do with the File Types Editor:
- Select your deployment project
- Click on the File Types Editor button
- Right click on the "File Types on Target Machine"
- Add File Type
- Use the Extensions property on your new File Type to specify one or more file extensions to be associated with your program.
- In the Command property choose "Primary output" from your application.
You need to associate extension with your program: Registering the Extension
精彩评论