how to force that any file of a certain type will open with my program?

拟墨画扇 提交于 2019-12-30 13:57:08

问题


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 open with my program ?

thank's in advance


回答1:


If you have a Deployment project for your program it is easy to do with the File Types Editor:

  1. Select your deployment project
  2. Click on the File Types Editor button
  3. Right click on the "File Types on Target Machine"
  4. Add File Type
  5. Use the Extensions property on your new File Type to specify one or more file extensions to be associated with your program.
  6. In the Command property choose "Primary output" from your application.



回答2:


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).




回答3:


You need to associate extension with your program: Registering the Extension



来源:https://stackoverflow.com/questions/4067545/how-to-force-that-any-file-of-a-certain-type-will-open-with-my-program

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!