首页 > 代码库 > C# Console 运行之后最新化状态栏
C# Console 运行之后最新化状态栏
static void Main(string[] args) { new ConsoleCtrl(); Console.Read(); } class ConsoleCtrl { [DllImport("User32.dll", EntryPoint = "FindWindow")] private static extern IntPtr FindWindow(string lpClassName, string lpWindowName); [DllImport("user32.dll", EntryPoint = "FindWindowEx")] //找子窗体 private static extern IntPtr FindWindowEx(IntPtr hwndParent, IntPtr hwndChildAfter, string lpszClass, string lpszWindow); [DllImport("User32.dll", EntryPoint = "SendMessage")] //用于发送信息给窗体 private static extern int SendMessage(IntPtr hWnd, int Msg, IntPtr wParam, string lParam); [DllImport("User32.dll", EntryPoint = "ShowWindow")] // private static extern bool ShowWindow(IntPtr hWnd, int type); public ConsoleCtrl() { Console.Title = "个人工作平台"; IntPtr ParenthWnd = new IntPtr(0); IntPtr et = new IntPtr(0); ParenthWnd = FindWindow(null, "个人工作平台"); ShowWindow(ParenthWnd, 2);//隐藏本dos窗体, 0: 后台执行;1:正常启动;2:最小化到任务栏;3:最大化 } }
C# Console 运行之后最新化状态栏
声明:以上内容来自用户投稿及互联网公开渠道收集整理发布,本网站不拥有所有权,未作人工编辑处理,也不承担相关法律责任,若内容有误或涉及侵权可进行投诉: 投诉/举报 工作人员会在5个工作日内联系你,一经查实,本站将立刻删除涉嫌侵权内容。