很好解決:
var WndHandle:THandle;
Wndclass:array[0..50] of Char;
begin
strpcopy(@Wndclass[0],'Shell_traywnd');
Wndhandle:=findwindow(@wndclass[0],nil);
Showwindow(Wndhandle,sw_Hide);
end;
把sydan 老兄的代码中的showwindow()改成enablewindow()可以不?
var WndHandle:THandle;
Wndclass:array[0..50] of Char;
begin
strpcopy(@Wndclass[0],'Shell_traywnd');
Wndhandle:=findwindow(@wndclass[0],nil);
if Wndhandle<>0 then
Enablewindow(Wndhandle,FALSE);
end;