Tricks to hide and display the Windows taskbar.
Functions are used:
/ / Hide the Taskbar
ShowWindow (FindWindow ('Shell_TrayWnd',''), SW_HIDE);
/ / Display the Taskbar
ShowWindow (FindWindow ('Shell_TrayWnd',''), SW_SHOW);
Example of implementation:
/ / Hide the Taskbar
procedure TForm1.Button1Click (Sender: TObject);
begin
ShowWindow (FindWindow ('Shell_TrayWnd',''), SW_HIDE);
end;
/ / Display the Taskbar
procedure TForm1.Button2Click (Sender: TObject);
begin
ShowWindow (FindWindow ('Shell_TrayWnd',''), SW_SHOW);
end;
Example # 2:
TForm1.CheckBox1Click procedure (Sender: TObject);
begin
if CheckBox1.Checked then ShowWindow (FindWindow ('Shell_TrayWnd',''), SW_SHOW)
else ShowWindow (FindWindow ('Shell_TrayWnd',''), SW_HIDE);
end;
TForm1.FormCreate procedure (Sender: TObject);
begin
if FindWindow ('Shell_TrayWnd','') <> 0 then
CheckBox1.Checked: = True
else CheckBox1.Checked: = False;
end;
No comments:
Post a Comment