激活另一个进程

[DllImport("user32.dll")]
        public static extern void SetForegroundWindow(IntPtr hwnd);
        [DllImport("user32.dll")]
        public static extern IntPtr FindWindow(String classname, String title);
        private void btn_OpenMini_Click(object sender, EventArgs e)
        {
            try
            {
                Process.Start(AppDomain.CurrentDomain.BaseDirectory.Trim() + "Mini.exe");              
                SetForegroundWindow(FindWindow(null,"彩铃DIY迷你首页"));
            }
            catch
            { }
        }
posted @   94cool  阅读(208)  评论(0编辑  收藏  举报
努力加载评论中...
点击右上角即可分享
微信分享提示