C#我的设置默认应用程序,应用程序 [英] C# Setting my application as default app
问题描述
我是一个新手程序员和开发为我自己需要的记事本替代的应用程序(有一些更多的功能)。当我双击一个.txt文件(或一个可定制的扩展名,例如.abc的),我想该文件在我的应用程序,就像记事本上运行。我读了有关文件协会程序,但我没有得到太多。
I'm a novice programmer and have developed a notepad replacement application for my own needs (with some more features). When I double click a .txt file (or a customizable extension such as .abc), I want the file to run in my application just like notepad. I read about File Association with programs but I didn't get much of it.
有人能指出我我会怎么做呢?只要给我一些想法,我真的想这样做,对我的用户设置应用程序为默认的文本编辑器的选项。帮助将非常感激。
Can someone point me to how I would do this? Just give me a few ideas, I would really like to do this and have an option for my users to set the application as the default text editor. Help would be much appreciated.
推荐答案
如果您正在使用点击一次部署(即VS发表为Windows EXE ),您可以指定文件关联的 <有/ em>的,它会为你做的一切。我的不能的保证,它会优先于记事本,虽然。对于是的你可能需要一个适当的安装...
If you are using click-once deployment (i.e. "publish" in VS for a windows exe), you can specify file associations there, and it will do everything for you. I can't guarantee that it'll take precedence over notepad, though. For that you might need a proper installer...
这篇关于C#我的设置默认应用程序,应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!