Solved

How can I Disable and enable start button ?

Posted on 2004-03-25
5
346 Views
Last Modified: 2010-04-05
How can I Disable and enable start button with its list ?
The solution must success under win9x – winme – winxp
 
I am waiting your answers
Thanks
0
Comment
Question by:peruzzi
  • 3
5 Comments
 

Expert Comment

by:arodionov
ID: 10675489
Hello.

Try to look at www.torry.ru
I saw there components which solves your problem.
Type 'Start button' in the quick search.

Alex.
0
 
LVL 11

Expert Comment

by:calinutz
ID: 10675503
//To disable the start button
  EnableWindow(FindWindowEx(FindWindow('Shell_TrayWnd', nil),0, 'Button', nil),false);

 //To enable the start button
  EnableWindow(FindWindowEx(FindWindow('Shell_TrayWnd', nil),0,'Button',nil),true);

But the problem is that it disables only for mouse click. If you pres the windows button the list appears.
0
 
LVL 11

Expert Comment

by:calinutz
ID: 10675521
Or you could try this to hide the Start button:

procedure ShowStartButton(bValue: Boolean);
var
  Tray, Child: hWnd;
  C: array[0..127] of Char;
  S: String;
begin
  Tray  := FindWindow('Shell_TrayWnd', nil);
  Child := GetWindow(Tray, GW_CHILD);
  while Child <> 0 do
  begin
  if GetClassName(Child, C, SizeOf(C)) > 0 then
  begin
    S := StrPAS(C);
    if UpperCase(S) = 'BUTTON' then
    begin
      if bValue = True then ShowWindow(Child, 1)
      else
        ShowWindow(Child, 0);
    end;
 end;
 Child := GetWindow(Child, GW_HWNDNEXT);
 end;
end;
0
 
LVL 11

Accepted Solution

by:
calinutz earned 40 total points
ID: 10675576
To disable windows buttons you have to use a system wide hook like explained (with code) here:
http://www.swissdelphicenter.ch/en/showcode.php?id=1212
0
 

Author Comment

by:peruzzi
ID: 10677399
Thanks calinutz
and also thanks for arodionov

code work well with  winxp but did not work with winme
what I need is to work under winxp
0

Featured Post

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Internet Explorer View Settings Question 15 111
how to manage invalidate between two tvirtualstringtree in same form? 1 114
Performance of SQL statement 37 111
CheckListBox usage 3 58
The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
This tutorial gives a high-level tour of the interface of Marketo (a marketing automation tool to help businesses track and engage prospective customers and drive them to purchase). You will see the main areas including Marketing Activities, Design …
Established in 1997, Technology Architects has become one of the most reputable technology solutions companies in the country. TA have been providing businesses with cost effective state-of-the-art solutions and unparalleled service that is designed…

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question