Solved

How to kill that annoying Start button?

Posted on 2001-07-31
6
184 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 50 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
Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

 

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

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
ddeman not working in activex 3 103
code issue 8 126
URL for downloading Google Chrome for Win XP 2 152
LAN or WAN ? 11 89
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…
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…

813 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

10 Experts available now in Live!

Get 1:1 Help Now