...die Uhr im System Tray verstecken?
Autor: Thomas Stutz
function ShowTrayClock(bValue: Boolean) : Boolean;
var
TrayWnd, TrayNWnd, ClockWnd: HWND;
begin
TrayWnd := FindWindow('Shell_TrayWnd', nil);
TrayNWnd := FindWindowEx(TrayWnd, 0, 'TrayNotifyWnd', nil);
ClockWnd := FindWindowEx(TrayNWnd, 0, 'TrayClockWClass', nil);
Result := IsWindow(ClockWnd);
if Result then
begin
ShowWindow(ClockWnd, Ord(bValue));
PostMessage(ClockWnd, WM_PAINT, 0, 0);
end;
end;
// Example to hide they clock:
procedure TForm1.Button1Click(Sender: TObject);
begin
ShowTrayClock(Boolean(0));
end;
printed from
www.swissdelphicenter.ch
developers knowledge base