摘要: ///<summary> /// 添加启动项到注册表 ///</summary> void RegAdd() { string FullPathFile = Application.ExecutablePath; //获取带全路径的本程序 Registry.LocalMachine.OpenSubKey(@"SOFTWARE\Microsoft\Windows\CurrentVersion\Run", true).SetValue("Fast2011", FullPathFil... 阅读全文
posted @ 2011-10-25 18:10 心_远 阅读(244) 评论(0) 推荐(0) 编辑
摘要: using System;using System.Collections.Generic;using System.Windows.Forms;using Zone;using System.Diagnostics;using System.Reflection;using System.Runtime.InteropServices;namespace SmsSend{ static class Program { private const int WS_SHOWNORMAL = 1; [DllImport("User32.dll")] ... 阅读全文
posted @ 2011-10-25 18:03 心_远 阅读(322) 评论(0) 推荐(0) 编辑
摘要: static class Program{internal static ApplicationContext context = new ApplicationContext(new Form1());///<summary>/// 应用程序的主入口点。///</summary>[STAThread]static void Main(){Application.EnableVisualStyles(); //Application.SetCompatibleTextRenderingDefault(false); 这句要注释掉,否则会出错Application.Run 阅读全文
posted @ 2011-10-25 17:55 心_远 阅读(637) 评论(0) 推荐(0) 编辑
摘要: using System;using System.Collections.Generic;using System.Windows.Forms;using System.Diagnostics;//引入Process 类using System.Reflection;//引入Assemblyusing System.Runtime.InteropServices; //需要获取句柄,激活前一实例using System.Threading;//需要用到mutexnamespace fasta2011{ static class Program { /// <sum... 阅读全文
posted @ 2011-10-25 17:48 心_远 阅读(175) 评论(0) 推荐(0) 编辑