Winform判断是否已启动

2020-12-13 06:24

阅读:440

标签:winform   style   blog   color   os   io   for   ar   

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Diagnostics;
using System.Net;

namespace Client
{
    static class Program
    {
        /// 
        /// 应用程序的主入口点。
        /// 
        [STAThread]     
        static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);

            if (Process.GetProcessesByName("UI").Length > 0)
            {
                MessageBox.Show("请不要重复启动程序!");
            }
            else
            {
                //程序执行代码
            }
            
        }
    }
}

 

Winform判断是否已启动,搜素材,soscw.com

Winform判断是否已启动

标签:winform   style   blog   color   os   io   for   ar   

原文地址:http://www.cnblogs.com/wpcnblog/p/3904142.html


评论


亲,登录后才可以留言!