Tuesday, February 14, 2006

Hiding and showing the Windows Taskbar

To hide the Windows Taskbar you must use a code like this:


    procedure TForm1.Button1Click(Sender: TObject);

    var

      hTaskBar :Thandle;

    begin

      hTaskBar := FindWindow('Shell_TrayWnd',Nil);

      ShowWindow(hTaskBar,Sw_Hide);

    end;


To Show the Windows Taskbar, you must use this code:



    procedure TForm1.Button2Click(Sender: TObject);

    var

      hTaskBar :Thandle;

    begin

      hTaskBar := FindWindow('Shell_TrayWnd',Nil);

      ShowWindow(hTaskBar,Sw_Normal);

    end;

0 Comments:

Post a Comment

<< Home