东莞大公司排名,搜索引擎seo关键词优化方法,模板企业网站,简单工程承包合同1 Web打开winform程序#xff0c;需要使用的标签为a标签
a hrefSelfName://连接提示/a //SelfName 是自己的自定义协议2 Winform程序一般不需要做任何操作#xff0c;如果需要参数传递的情况下#xff0c;可以将Winform的Program.cs程序修…1 Web打开winform程序需要使用的标签为a标签
a hrefSelfName://连接提示/a //SelfName 是自己的自定义协议2 Winform程序一般不需要做任何操作如果需要参数传递的情况下可以将Winform的Program.cs程序修改一下用以接收参数
static class Program{/// summary/// 应用程序的主入口点。/// /summary//[STAThread]//static void Main()//{// Application.EnableVisualStyles();// Application.SetCompatibleTextRenderingDefault(false);// Application.Run(new Form1());//}/// summary/// 应用程序的主入口点。/// /summary[STAThread]static void Main(String[] args){try{Application.EnableVisualStyles();Application.SetCompatibleTextRenderingDefault(false);//SplashScreen.Splasher.Show(typeof(SplashScreen.frmSplash));if (args.Length 0){args[0] args[0].Replace(SelfName://, );}var form new Form1(args);Application.Run(form);}catch (Exception ex){}}}
3 最重要的是进行注册表注册
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\SelfName]
SelfNameProtocol
URL ProtocolC:\\Tmp\\Winform\\Winform.exe
[HKEY_CLASSES_ROOT\SelfName\DefaultIcon]
C:\\Tmp\\Winform\\Winform.exe,0
[HKEY_CLASSES_ROOT\SelfName\shell]
[HKEY_CLASSES_ROOT\SelfName\shell\open]
[HKEY_CLASSES_ROOT\SelfName\shell\open\command]
\C:\\Tmp\\Winform\\Winform.exe\ \%0\这里面SelfName是可以自定义的这里面有一个参数0查看其他人的博客都是1个人感觉可能与传输参数个数有关这个理解仍需验证先记录到这里。