http://expert.csdn.net/Expert/topic/2236/2237000.xml?temp=.9667017
解决方案 »
- 如何添加toolStripSeparator?
- IStyleGalleryItem与ITextSymbol的转换
- 请问DirectoryService能不能远程操作IIS?
- 如何把PDF文件以二进制形式保存到数据库表中,然后再可以把读出来。
- C#中文手册CHM版[bbs.molinz.cn]首发
- 求一些有大量C#Sockek,MySQL数据库等方面知识文章的Blog或网站。谢谢
- XML读写的问题
- 求教 来看看啊
- 如何用string.format消除float数据高位的零,但要用空格占位
- .net中好象没有控件数组
- xml在.net中如何用?
- 在WEB开发中,如何编写一个TextBox的LostFoucs事件?
{
Process current = Process.GetCurrentProcess();
Process[] processes = Process.GetProcessesByName (current.ProcessName);
//Loop through the running processes in with the same name
foreach (Process process in processes)
{
//Ignore the current process
if (process.Id != current.Id)
{
//Make sure that the process is running from the exe file.
if (Assembly.GetExecutingAssembly().Location.Replace("/", "\\") == current.MainModule.FileName)
{
//Return the other process instance.
return process;
}
}
}
//No other instance was found, return null.
return null;
}