先谢过了
解决方案 »
- C#新手请各位大神帮忙回答下这个怎么搞
- 求数据库映射成类文件的代码生成器的原理
- 怎么设置类属性继承默认值?
- 该语句select max(to_number(vcEquipCode)) as vcEquipCode from gdequipmentcontentlf 是否正确?
- 如何把一个string类型转换为byte[]????
- 急急急急急急急急急急——请高手们看看我的程序哪里错误在哪里??(关于RDA)
- ★★★兄弟们,读写文件的问题,为什么会出错???★★★
- 求助!急!(5)
- 怎样在dataset表中插入一列
- C# winfrom中一个Combobox控件中绑定两个数据集 代码如下
- IndexOf的请教,我不懂该代码在以下代码的作用?
- 郁闷,居然提示“使用了未赋值的局部变量”
using Microsoft.Win32; string strName = Application.ExecutablePath;
if (!File.Exists(strName))
return;
string strnewname = strName.Substring(strName.LastIndexOf("\\") + 1);//获取执行文件名
RegistryKey RKey = Registry.LocalMachine.OpenSubKey("SOFTWARE\\Microsoft\\Windows\\CURRENTVERSION\\Run", true);
if (RKey == null)
RKey = Registry.LocalMachine.CreateSubKey("SOFTWARE\\Microsoft\\Windows\\CURRENTVERSION\\Run");
RKey.SetValue(strnewname, strName);
MessageBox.Show("开机生效");