WPF 禁止程序重复打开的问题 if 进程是否存在 置顶else 新建http://blog.csdn.net/wzhiu/article/details/7676702 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 private void Window_Loaded(object sender, RoutedEventArgs e) { Process[] pro = Process.GetProcesses(); int n = pro.Where(p => p.ProcessName.Equals("进程名称")).Count(); if (n > 1) { Application.Current.Shutdown(); return; } } 获得 窗口句柄, 再使用SetForeGroudWindow(int hwnd)方法可以将其激活并设置为前台窗口 使用SetForeGroudWindow现在可以激活了,不过如果程序最小化还是不会弹出来 c#如何访问ftp C语言中的算法转换到C#,什么得出的结果会出现不同? c#怎么保存非字符串配置 oledbdataadapter fill() 问题 Microsoft Visual Studio repeater控件的显示不同颜色的问题 datagrid滚动 谁能帮我完成一个方法>>> activex ocx 和 强名称; up有分 请教一个程序的框架设计 des算法一致性请教。 如何让一个TextBox只接受特定的字符集合?
private void Window_Loaded(object sender, RoutedEventArgs e)
{
Process[] pro = Process.GetProcesses();
int n = pro.Where(p => p.ProcessName.Equals("进程名称")).Count();
if (n > 1)
{
Application.Current.Shutdown();
return;
}
}