Thema: Delphi Uhr verstecken

Einzelnen Beitrag anzeigen

Benutzerbild von Jens Schumann
Jens Schumann

Registriert seit: 27. Apr 2003
Ort: Bad Honnef
1.644 Beiträge
 
Delphi 2009 Professional
 
#3

Re: Uhr verstecken

  Alt 4. Mär 2004, 09:10
Hallo,
wie wäre es damit
Delphi-Quellcode:
procedure TForm1.Button1Click(Sender: TObject);
var
  WindowHandle_TrayWnd : hWnd;
  WindowHandle_TrayNotifyWnd : hWnd;
  WindowHandle_TrayClockWClass : hWnd;
begin
  WindowHandle_TrayWnd:=FindWindow('Shell_TrayWnd', nil);
  If WindowHandle_TrayWnd<>0 then
    WindowHandle_TrayNotifyWnd := FindWindowEx(WindowHandle_TrayWnd, 0, 'TrayNotifyWnd', nil);
  If WindowHandle_TrayNotifyWnd<>0 then
    WindowHandle_TrayClockWClass := FindWindowEx(WindowHandle_TrayNotifyWnd, 0, 'TrayClockWClass', nil);
  If WindowHandle_TrayClockWClass<>0 then
    ShowWindow(WindowHandle_TrayClockWClass,SW_SHOW);
end;

procedure TForm1.Button2Click(Sender: TObject);
var
  WindowHandle_TrayWnd : hWnd;
  WindowHandle_TrayNotifyWnd : hWnd;
  WindowHandle_TrayClockWClass : hWnd;
begin
  WindowHandle_TrayWnd:=FindWindow('Shell_TrayWnd', nil);
  If WindowHandle_TrayWnd<>0 then
    WindowHandle_TrayNotifyWnd := FindWindowEx(WindowHandle_TrayWnd, 0, 'TrayNotifyWnd', nil);
  If WindowHandle_TrayNotifyWnd<>0 then
    WindowHandle_TrayClockWClass := FindWindowEx(WindowHandle_TrayNotifyWnd, 0, 'TrayClockWClass', nil);
  If WindowHandle_TrayClockWClass<>0 then
    ShowWindow(WindowHandle_TrayClockWClass,SW_HIDE);
end;
I come from outer space to save the human race
  Mit Zitat antworten Zitat