如题,有什么简单的方法??

解决方案 »

  1.   

    在你的console程序中写
            [DllImport("user32.dll", EntryPoint = "ShowWindow", SetLastError = true)]
            private static extern bool ShowWindow(IntPtr hWnd, uint nCmdShow);
            [DllImport("user32.dll", EntryPoint = "FindWindow", SetLastError = true)]
            private static extern IntPtr FindWindow(string lpClassName, string lpWindowName);
                Console.Title = Guid.NewGuid().ToString("n");
                var w = FindWindow("ConsoleWindowClass", Console.Title);
                if (w != IntPtr.Zero)
                    ShowWindow(w, 0);