?
Solved

How to kill that annoying Start button?

Posted on 2001-07-31
6
Medium Priority
?
192 Views
Last Modified: 2010-08-05
How can i HIDE the start button and make sure that it cant be accessed from the keyboard?
0
Comment
Question by:Yevgen
6 Comments
 
LVL 2

Expert Comment

by:joepezt
ID: 6338017

if you want to hide the entire taskbar this should do the trick


  Procedure HideTaskBar(yesno : boolean);
  begin
  if yesno = true then
     ShowWindow(FindWindow('Shell_TrayWnd', nil), SW_HIDE)
     else ShowWindow(FindWindow('Shell_TrayWnd', nil), SW_SHOW);
  end;

0
 

Author Comment

by:Yevgen
ID: 6338533
I know about that but i need the TaskBar and i want to make the Start button go away even if the Windows button on the keyboard is pressed...
0
 
LVL 5

Accepted Solution

by:
alanwhincup earned 200 total points
ID: 6338793
Try this:

procedure ShowStartButton(Visible : Boolean);
var
  H, TaskWindow : hWnd;
begin
  if Visible = True then
  begin
    H := FindWindowEx(GetDesktopWindow, 0, 'Button', nil);
    TaskWindow := FindWindow('Shell_TrayWnd', nil);
    ShowWindow(H, SW_SHOW);
    Windows.SetParent(H, TaskWindow);
  end
  else
  begin
    H := FindWindowEx(FindWindow('Shell_TrayWnd', nil), 0, 'Button', nil);
    ShowWindow(H, SW_HIDE);
    Windows.SetParent(H, 0);
  end;
end;


procedure TForm1.Button1Click(Sender: TObject);
begin
  ShowStartButton(False);
end;
0
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 

Expert Comment

by:St3v13
ID: 6338796
procedure TForm1.Button6Click(Sender: TObject);
var  Rgn : hRgn;
begin
{Hide the start button}
      Rgn := CreateRectRgn(0, 0, 0, 0);
      SetWindowRgn(FindWindowEx(FindWindow('Shell_TrayWnd', nil),
                                       0,
                                      'Button',
                                       nil),
                                       Rgn,
                                       true);
end;

procedure TForm1.Button5Click(Sender: TObject);
begin
  {Turn the start button back on}
  SetWindowRgn(FindWindowEx(FindWindow('Shell_TrayWnd', nil),
                                       0,
                                      'Button',
                                       nil),
                                       0,
                                       true);
end;

:-)
Stephen
0
 

Author Comment

by:Yevgen
ID: 6338813
Great Idea and works great...

I did everything but i havent thought about setting the Parent window to 0... Thanks...
0
 

Author Comment

by:Yevgen
ID: 6338818
Alanwhincup's way is the best...
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

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

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…
Have you ever had your Delphi form/application just hanging while waiting for data to load? This is the article to read if you want to learn some things about adding threads for data loading in the background. First, I'll setup a general applica…
this video summaries big data hadoop online training demo (http://onlineitguru.com/big-data-hadoop-online-training-placement.html) , and covers basics in big data hadoop .
With just a little bit of  SQL and VBA, many doors open to cool things like synchronize a list box to display data relevant to other information on a form.  If you have never written code or looked at an SQL statement before, no problem! ...  give i…
Suggested Courses

862 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