有注册代码如下:
RegistryKey shell = Registry.ClassesRoot.OpenSubKey(@"*shell", true);
RegistryKey custom = shell.CreateSubKey(menuName);
RegistryKey cmd = custom.CreateSubKey("command");
cmd.SetValue("", Application.ExecutablePath + " %1");
cmd.Close();
custom.Close();
shell.Close();
问: 如果程序已经运行,如何把右键所得参数直接传入程序,而不是再启动程序。
RegistryKey shell = Registry.ClassesRoot.OpenSubKey(@"*shell", true);
RegistryKey custom = shell.CreateSubKey(menuName);
RegistryKey cmd = custom.CreateSubKey("command");
cmd.SetValue("", Application.ExecutablePath + " %1");
cmd.Close();
custom.Close();
shell.Close();
问: 如果程序已经运行,如何把右键所得参数直接传入程序,而不是再启动程序。
http://topic.csdn.net/u/20081221/01/457bb3b1-2f19-47e2-9621-cf4117ee45ce.html