zoukankan
html css js c++ java
C#判断程序是否运行
using
System;
using
System.Collections.Generic;
using
System.Windows.Forms;
using
System.Diagnostics;
using
System.Collections;
namespace
DataUpper
{
static
class
Program
{
/**/
///
<summary>
///
应用程序的主入口点。
///
</summary>
[STAThread]
static
void
Main()
{
int
iProcessNum
=
0
;
foreach
(Process singleProc
in
Process.GetProcesses())
{
if
(singleProc.ProcessName
==
Process.GetCurrentProcess().ProcessName)
{
iProcessNum
+=
1
;
}
}
if
(iProcessNum
>
1
)
{
MessageBox.Show(
"
该程序已经在运行中!
"
,
"
天科多协议处理子程序
"
, MessageBoxButtons.OK, MessageBoxIcon.Information);
}
else
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(
false
);
Application.Run(
new
DataUpper());
}
}
}
}
查看全文
相关阅读:
Windows Phone 7 日期选择控件DatePicker和时间选择控件TimePicker
Windows Phone 7 开发小技巧
Windows Phone 7 MVVM模式的学习笔记
Windows Phone 7 网络编程之留言板应用
C# 中的INotifyPropertyChanged和ObservableCollection<T>
《深入浅出:Windows Phone 7应用开发》
Windows Phone 7 MVVM模式通讯方式之实现Command
Windows Phone 7 chart图表编程
Windows Phone 7 网络编程之调用web service
Perst嵌入式数据库介绍
原文地址:https://www.cnblogs.com/zhangpengshou/p/1345111.html
最新文章
Windows Phone 7 网络编程之webclient和httpwebrequest的使用
Windows Phone 7 MVVM模式通讯方式之实现Attached Behavior
Windows Phone 7 本地数据库SQL Server CE(芒果更新)
XNA游戏:Hello XNA
Windows Phone 7 网络编程之调用WCF Service
Windows Phone 7 网络编程之WebBrowser控件的使用
Windows Phone 7 MVVM模式通讯方式之实现Binding Data
Windows Phone 7 日历应用的实现
Windows Phone 7 水平滚动的文本
Windows Phone 7 Perst数据库的一些常用的类和方法
热门文章
Windows Phone 7 自动完成输入框控件AutoCompleteBox
Windows Phone 7 独立存储使用XML文件来存储信息
Windows Phone 7 使用Perst数据库的Demo——流水账
Windows Phone 7 获取用户通讯录和日程安排信息
Windows Phone 7 检查手机网络
Windows Phone 7 如何判断ListBox控件滚动到底
Windows Phone 7 程序等待页面的处理
Windows Phone 7 网络编程之使用Socket(芒果更新)
Windows Phone 7 推送通知(Push Notification)
Tea加密算法和XxTea加密算法
Copyright © 2011-2022 走看看