DelphiFAQ Home Search:

Disabling and Enabling of the start menu (start button)

 

commentsThis 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:

procedure EnableStartbutton(bEnabled: Boolean);
begin
  EnableWindow(FindWindowEx(FindWindow('Shell_TrayWnd', nil) ,0 ,'Button' ,nil), bEnabled)
end; 
You don't like the formatting? Check out SourceCoder then!
Content-type: text/html

Comments:

2012-10-29, 05:41:12
anonymous from China  

 

 

NEW: Optional: Register   Login
Email address (not necessary):

Rate as
Hide my email when showing my comment.
Please notify me once a day about new comments on this topic.
Please provide a valid email address if you select this option, or post under a registered account.
 

Show city and country
Show country only
Hide my location
You can mark text as 'quoted' by putting [quote] .. [/quote] around it.
Please type in the code:

Please do not post inappropriate pictures. Inappropriate pictures include pictures of minors and nudity.
The owner of this web site reserves the right to delete such material.

photo Add a picture: