在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
Delphi 在任务栏隐藏程序图标 原文:https://www.cnblogs.com/findumars/p/4740482.html
方法一: 方法二: ---------------------------------------------------------------------------------------- //本程序在任务栏中不显示MSTaskListWClass
procedure TForm1.FormShow(Sender: TObject); begin ShowWindow(Application.handle,SW_HIDE); end; procedure TForm1.Button1Click(Sender: TObject); begin ShowWindow(Application.Handle, SW_HIDE);//隐藏任务栏中的图标 SetWindowLong(Application.Handle, GWL_EXSTYLE, GetWindowLong(Application.Handle, GWL_EXSTYLE) or WS_EX_TOOLWINDOW and not WS_EX_APPWINDOW); end; ShowWindow(FindWindow('Form2'),SW_HIDE);//隐藏窗体 ShowWindow(Form2.Handle,SW_HIDE);//隐藏窗体 ShowWindow(Self.Handle,SW_HIDE);//隐藏窗体 ShowWindow(FindWindow('Form2'),SW_NORMAL);//显示窗体 ShowWindow(Form2.Handle,SW_NORMAL);//显示窗体 ShowWindow(Self.Handle,SW_NORMAL);//显示窗体 ShowWindow(Application.Handle,SW_HIDE);//隐藏任务栏中的图标 {这一句在FormCreate 不能显示出效果的} ShowWindow(Application.Handle,SW_NORMAL);//显示任务栏中的图标 setwindowpos(application.handle,hwnd_top,0,0,0,0,swp_hidewindow);//不显示在系统栏 参考:http://www.cnblogs.com/xe2011/archive/2012/06/02/2531604.html |
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论