Solved

How can I Disable and enable start button ?

Posted on 2004-03-25
5
349 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…
Suggested Courses
Course of the Month7 days, 23 hours left to enroll

617 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