Solved

How can I Disable and enable start button ?

Posted on 2004-03-25
5
344 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

Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

Join & Write a Comment

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…
Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…

758 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now