开始菜单的时钟区域

  • 主题发起人 主题发起人 import
  • 开始时间 开始时间
I

import

Unregistered / Unconfirmed
GUEST, unregistred user!
隐藏系统tray:
showwindow(findwindow('Shell_TrayWnd',nil),SW_HIDE); // 隐藏
showwindow(findwindow('Shell_TrayWnd',nil),SW_NORMAL); // 恢复
procedure TForm1.DisableStartMenu;
var
Handle,ChildHandle,SecLayerH,H:HWND;
clsName:pchar;
begin
h:=findwindow('progman',nil);
if h<>0 then
showwindow(h,sw_hide);
//
getmem(clsName,255);
Handle:=FindWindow('Shell_TrayWnd',nil);
if Handle<>0 then
begin
ChildHandle:=GetWindow(Handle,GW_Child);
while ChildHandle<>0 do
begin
GetClassName(ChildHandle,clsName,255);
if string(clsName)='Button' then
begin
PostMessage(ChildHandle,WM_SYSCOMMAND,SC_CLOSE,0);
end;
if string(clsName)='TrayNotifyWnd' then
begin
SecLayerH:=GetWindow(ChildHandle,GW_CHILD);
while SecLayerH<>0 do
begin
GetClassName(SecLayerH,clsName,255);
if string(clsName)='TrayClockWClass' then
begin
PostMessage(SecLayerH,WM_SYSCOMMAND,SC_CLOSE,0);
end;
SecLayerH:=GetWindow(SecLayerH,GW_HWNDNEXT);
end;
end;
ChildHandle:=GetWindow(ChildHandle,GW_HWNDNEXT);
end;
end;
freemem(clsName,255);
end;
 

Similar threads

I
回复
0
查看
515
import
I
S
回复
0
查看
688
SUNSTONE的Delphi笔记
S
S
回复
0
查看
683
SUNSTONE的Delphi笔记
S
I
回复
0
查看
528
import
I
后退
顶部