Mega Code Archive

 
Categories / Delphi / System
 

Hide start button

Title: Hide start button Use this procedure to hide (AVisible=True) or show (AVisible=False) the start button: procedure TForm1.HideStartButton(AVisible: Boolean); var Tray,Child,StartButtonHandle: HWnd; C: array[0..127] of Char; S: string; begin Tray:=FindWindow('Shell_TrayWnd',nil); Child:=GetWindow(Tray,GW_CHILD); while Child&lt&gt0 do begin if GetClassName(Child,C,SizeOf(C))&gt0 then begin S:=StrPas(C); if UpperCase(S)='BUTTON' then begin StartButtonHandle:=Child; if AVisible then ShowWindow(Child,1) else ShowWindow(Child,0); end; end; Child:=GetWindow(Child,GW_HWNDNEXT); end; end;