惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

量子位
博客园 - 三生石上(FineUI控件)
D
DataBreaches.Net
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
GbyAI
GbyAI
P
Proofpoint News Feed
Microsoft Security Blog
Microsoft Security Blog
月光博客
月光博客
I
InfoQ
V
Visual Studio Blog
罗磊的独立博客
Engineering at Meta
Engineering at Meta
Vercel News
Vercel News
Jina AI
Jina AI
L
LangChain Blog
Apple Machine Learning Research
Apple Machine Learning Research
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
B
Blog
The Cloudflare Blog
小众软件
小众软件
雷峰网
雷峰网
V
V2EX
人人都是产品经理
人人都是产品经理
Stack Overflow Blog
Stack Overflow Blog

博客园 - 林子

关于IT概念的一些思考 UML相关工具一览(截止2012年10月)(ZT) 业务分析师在敏捷项目中的作用(ZT) 对业务建模的思考——为什么要业务建模 (转) 如何管理你的程序员(ZT) 引入敏捷是否需要颠覆现有技术管理框架?(ZT) 时间管理(Time Management)(ZT) 分析:商业智能中外差距到底有多大(ZT) SQL Server 索引基础知识 主键与聚集索引(ZT) 无依赖Office资源的导入导出 sqlite使用手册(ZT) 2008新的一年到来了! .net2.0中SqlBulkCopy批量复制数据出错原因分析! 用Dundas制作盒须图BoxPlot(盒式图,箱形图) 101个微软提供的Visual Studio 2005示例(ZT) .NET中完成FTP各功能操作 Dundas Win Chart 5.5.0的破解... 在窗体的Load时怎么退出窗体 Win窗体程序中的DataGridView未提供的DataView存在的功能!(ZT)
Visual Studio 2005(C#)中只允许一个实例运行的一种方法
林子 · 2007-01-24 · via 博客园 - 林子

using System;
using System.Collections.Generic;
using System.Windows.Forms;

namespace School.ReadPaperControl
{
    static class Program
    {
        /// <summary>
        /// The main entry point for the application.
        /// </summary>
        [STAThread]
        static void Main()
        {
            // 控制仅打开单实例进程
            if (System.Diagnostics.Process.GetProcessesByName(System.Diagnostics.Process.GetCurrentProcess().ProcessName).Length == 0)
            {
                Application.EnableVisualStyles();
                Application.SetCompatibleTextRenderingDefault(false);
                Application.Run(new frmControl());
            }
        }
    }
}