Disable / enable Start button

The Start button will be still visible, but not clickable. Completely useless trick. 🙂

Just one line of code using EnableWindow function will do the trick. In our example, it’s made as an OnClick event of standard button. Just change the last parameter of the function to true and the Start button is enabled again.

procedure TForm1.DeactivateStartButtonClick(Sender: TObject);
begin
EnableWindow(FindWindowEx(FindWindow('Shell_TrayWnd', nil), 0, 'Button', nil), false);
end;

procedure TForm1.ActivateStartButtonClick(Sender: TObject);
begin
EnableWindow(FindWindowEx(FindWindow('Shell_TrayWnd', nil), 0, 'Button', nil), true);
end;

Remember that start button key on your keyboard is still working even if you disable Start button itself, so Start menu is still accessible.