上一页 1 2 3 4 5 6 7 ··· 11 下一页
摘要: 第一种方法:抓取程序的进程名,在系统已运行进程中检索该进程名是否已经存在 //获取欲启动进程名 string strProcessName = System.Diagnostics.Process.GetCurrentProcess().ProcessName; //检查进程是否已经启动,已经启动则 阅读全文
posted @ 2023-11-07 00:15 芈璐 阅读(3122) 评论(0) 推荐(0)
摘要: static void Main() { Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); Application.ThreadException += Applicatio 阅读全文
posted @ 2023-11-04 23:31 芈璐 阅读(67) 评论(0) 推荐(0)
摘要: int iFormWidth, iFormHeight;//初始窗体宽高 //窗体加载事件 private void Form1_Load(object sender, EventArgs e) { iFormWidth = this.Width;//初始宽 iFormHeight = this.H 阅读全文
posted @ 2023-11-03 20:31 芈璐 阅读(1023) 评论(0) 推荐(0)
摘要: protected bool getTimeSpan(string timeStr) { //判断当前时间是否在工作时间段内 string _strWorkingDayAM = "07:00"; string _strWorkingDayPM = "19:00"; TimeSpan dspWorki 阅读全文
posted @ 2023-11-03 19:37 芈璐 阅读(278) 评论(0) 推荐(0)
摘要: using System.Net.Mail; MailMessage mmsg = new MailMessage(); mmsg.From = new MailAddress("");//发件邮箱地址 mmsg.To.Add("");//收件邮箱地址 mmsg.Subject = "";//邮件标 阅读全文
posted @ 2023-11-03 00:31 芈璐 阅读(29) 评论(0) 推荐(1)
摘要: using System.Speech.Synthesis; SpeechSynthesizer speech = new SpeechSynthesizer(); speech.Speak("");//同步 speech.SpeakAsync("");//异步 阅读全文
posted @ 2023-11-03 00:02 芈璐 阅读(68) 评论(0) 推荐(0)
摘要: 引用System.Management安装包。 using System.Management; ManagementObjectSearcher mydisplayResolution = new ManagementObjectSearcher("SELECT CurrentHorizontal 阅读全文
posted @ 2023-10-15 12:18 芈璐 阅读(178) 评论(0) 推荐(0)
摘要: 键盘按住shift+F10,会弹出cmd命令提示符框,然后输入: OOBE\BYPASSNRO 回车后重启系统选择“我没有Internet连接“即可。 阅读全文
posted @ 2023-06-07 21:26 芈璐 阅读(393) 评论(0) 推荐(0)
摘要: 添加引用 using System.Runtime.InteropServices;//调用外部的DLL 定义DLL [DllImport("kernel32.dll")] public static extern int WinExec(string programPath, int operTy 阅读全文
posted @ 2023-03-04 17:12 芈璐 阅读(174) 评论(0) 推荐(0)
摘要: /// <summary> /// 引用user32.dll动态链接库(windows api), /// 使用库中定义 API:SetCursorPos /// </summary> [DllImport("user32.dll")] private static extern int SetCu 阅读全文
posted @ 2023-02-22 10:39 芈璐 阅读(1051) 评论(0) 推荐(0)
上一页 1 2 3 4 5 6 7 ··· 11 下一页