当前位置:编程学习 > Delphi >>

隐藏任务条托盘区中的时钟

隐藏任务条托盘区中的时钟

// 隐藏时钟
procedure TForm1.Button1Click(Sender: TObject);
var
  hn : HWnd;
begin
  hn := FindWindowEx(FindWindowEx(FindWindow(Shell_TrayWnd,nil),0,
            TrayNotifyWnd,nil),0,TrayClockWClass,nil); 
  if hn <> 0 then
    ShowWindow(hn,SW_HIDE); 
end;

// 重现时钟
procedure TForm1.Button2Click(Sender: TObject); 
var
  hn : HWnd; 
begin 
  hn := FindWindowEx(FindWindowEx(FindWindow(Shell_TrayWnd,nil),0,
           TrayNotifyWnd,nil),0,TrayClockWClass,nil); 
  if hn <> 0 then 
    ShowWindow(hn,SW_SHOW);
end;
补充:软件开发 , Delphi ,
CopyRight © 2022 站长资源库 编程知识问答 zzzyk.com All Rights Reserved
部分文章来自网络,