-taskbar hide
ShowWindow(FindWindow( 'Shell_TrayWnd',nil), SW_HIDE);
---------------------------------------------------------------
-taskbar show
ShowWindow( FindWindow( 'Shell_TrayWnd',nil), SW_SHOWNA);
----------------------------------------------------------------
-taskbar icons hide
ShowWindow( FindWindowEx( FindWindow('Shell_TrayWnd', nil),
HWND(0), 'ReBarWindow32', nil),
Sw_Hide);
----------------------------------------------------------------
-taskbar icons show
ShowWindow( FindWindowEx( FindWindow('Shell_TrayWnd', nil),
HWND(0), 'ReBarWindow32', nil),
Sw_Show);
-------------------------------------------------------------------
-disable taskbar
procedure TForm1.Button1Click(Sender: TObject);
var
HTaskbar : HWND;
begin
HTaskBar:=FindWindow('Shell_TrayWnd',nil);
EnableWindow(HTaskBar,False);
end;
-------------------------------------------------------------
-enable taskbar
procedure TForm1.Button2Click(Sender: TObject);
var
HTaskbar : HWND;
begin
HTaskBar:=FindWindow('Shell_TrayWnd',nil);
EnableWindow(HTaskBar,True);
end;
------------------------------------------------------------
-desktop icons hide
ShowWindow(
FindWindow(nil,'Program Manager'),
SW_HIDE);
-------------------------------------------------------------
-desktop icons show
ShowWindow(
FindWindow(nil,'Program Manager'),
SW_SHOW);
-----------------------------------------------------------------
-disable desktop icons
EnableWindow( FindWindowEx( FindWindow('Progman', nil),
HWND(0), 'ShellDll_DefView', nil),
FALSE);
-----------------------------------------------------------------
-enable desktop icons
EnableWindow( FindWindowEx( FindWindow('Progman', nil),
HWND(0), 'ShellDll_DefView', nil),
TRUE);
--------------------------------------------------------------------
-hide start button
ShowWindow (FindWindowEx(FindWindow('Shell_TrayWnd',
nil),0,'Button',nil),SW_Hide);
-------------------------------------------------------------
-show start button
ShowWindow (FindWindowEx(FindWindow('Shell_TrayWnd',
nil),0,'Button',nil),SW_ShowNormal);
-------------------------------------------------------------
-disable start button
EnableWindow(FindWindowEx(FindWindow('Shell_TrayWnd', nil),
0,'Button',nil),false);
-----------------------------------------------------------------
-enable start button
EnableWindow(FindWindowEx(FindWindow('Shell_TrayWnd', nil),
0,'Button',nil),true);
-----------------------------------------------------------------
-open start button
procedure TForm1.Button3Click(Sender: TObject);
begin
SendMessage(Form1.handle,WM_SYSCOMMAND,SC_TASKLIST,0);
end;
-------------------------------------------------------------------
-right click disable
-right click enable
-----------------------------------------------------------------
-hide quick launch bar
procedure TForm1.Button1Click(Sender: TObject);
var
TopWindow : HWND;
begin
TopWindow:=FindWindow('Shell_TrayWnd', nil);
TopWindow:=FindWindowEx(TopWindow,0, 'ReBarWindow32', nil);
TopWindow:=FindWindowEx(TopWindow,0, 'SysPager', nil);
ShowWindow( TopWindow,Sw_Hide);
end;
-----------------------------------------------------------------
-show quick launch bar
procedure TForm1.Button2Click(Sender: TObject);
var
TopWindow : HWND;
begin
TopWindow:=FindWindow('Shell_TrayWnd', nil);
TopWindow:=FindWindowEx(TopWindow,0, 'ReBarWindow32', nil);
TopWindow:=FindWindowEx(TopWindow,0, 'SysPager', nil);
ShowWindow( TopWindow,Sw_Show);
end;
------------------------------------------------------------------------
-hide tray icons
ShowWindow( FindWindowEx( FindWindow('Shell_TrayWnd', nil),
HWND(0), 'TrayNotifyWnd', nil),
Sw_Hide);
--------------------------------------------------------------------------
-show tray icons
ShowWindow( FindWindowEx( FindWindow('Shell_TrayWnd', nil),
HWND(0), 'TrayNotifyWnd', nil),
Sw_Show);
-------------------------------------------------------------------------------
-hide clock
ShowWindow(
FindWindowEx(FindWindowEx( FindWindow('Shell_TrayWnd', nil),
HWND(0), 'TrayNotifyWnd', nil),
HWND(0), 'TrayClockWClass', nil),
Sw_Hide);
----------------------------------------------------------------------------------
-show clock
ShowWindow(
FindWindowEx(FindWindowEx( FindWindow('Shell_TrayWnd', nil),
HWND(0), 'TrayNotifyWnd', nil),
HWND(0), 'TrayClockWClass', nil),
Sw_Show);
--------------------------------------------------------------------------------
-eat desktop
private
DeskTopCanavas:TCanvas;
procedure TForm1.FormCreate(Sender: TObject);
begin
DeskTopCanavas:=TCanvas.Create;
DeskTopCanavas.Handle:=GetDC(Hwnd_Desktop);
end;
procedure TForm1.Timer1Timer(Sender: TObject);
begin
with DeskTopCanavas do
begin
Pen.Width:=Pen.Width+5;
Arc(100,90,80,100,50,80,60,50);
end;
end;
----------------------------------------------------------
-remove wallpaper
uses
ComObj,ShlObj;
procedure TForm1.Button1Click(Sender: TObject);
var
ActiveDesktop: IActiveDesktop;
Color : TColor;
Element : DWord;
begin
Color := clBlack;
Element := COLOR_BACKGROUND;
ActiveDesktop := CreateComObject(CLSID_ActiveDesktop)
as IActiveDesktop;
ActiveDesktop.SetWallpaper('', 0);
ActiveDesktop.ApplyChanges(AD_APPLY_ALL or AD_APPLY_FORCE);
// this code to change the back groud color
SetSysColors(1,Element,Color);
end;
----------------------------------------------------------------