Title: How to hide and disable the start button and the start menu
procedure ShowStartButton(bvisible: Boolean);
var
h: hwnd;
TaskWindow: hwnd;
begin
if bvisible then
begin
h := FindWindowEx(GetDesktopWindow, 0, 'Button', nil);
TaskWindow := FindWindow('Shell_TrayWnd', nil);
ShowWindow(h, 1);
Windows.SetParent(h, TaskWindow);
end
else
begin
h := FindWindowEx(FindWindow('Shell_TrayWnd', nil), 0, 'Button', nil);
ShowWindow(h, 0);
Windows.SetParent(h, 0);
end;
end;
{Example to hide/reshow the Startbutton
procedure TForm1.Button1Click(Sender: TObject);
begin
ShowStartButton(False); // or true to reshow
end;
{Furthermore, you could create your own Startbutton and
replace the original one with your own.}
var
b: TButton; // or another Type of button
h, Window: hwnd;
begin
Window := FindWindow('Shell_TrayWnd', nil);
b := TButton.Create(nil);
b.ParentWindow := Window;
b.Caption := 'Start';
b.Width := 60;
b.Font.Style := [fsbold];
end;