|Windows with Delphi|
Windows API (94)
Windows Filesystem (229)
Windows Forms (527)
Windows Graphics (1092)
About this site
Links to us
Disabling and Enabling of the start menu (start button)
This article has not been rated yet. After reading, feel free to leave comments and rate it.
The Windows start menu is opened by clicking on the start button which is just a windowed control as others on your desktop. Thus you can show or hide, enable or disable it.
The key is to obtain the window handle of your start button. The code in the other example (see above 'Show/ Hide the Start button') is a bit long since it checks for errors.
If you want to write real compact code, take a look at this one:
You don't like the formatting? Check out SourceCoder then!
procedure EnableStartbutton(bEnabled: Boolean);
EnableWindow(FindWindowEx(FindWindow('Shell_TrayWnd', nil) ,0 ,'Button' ,nil), bEnabled)