Solved

How to kill that annoying Start button?

Posted on 2001-07-31
6
182 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
Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

 

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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Suggested Solutions

In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…

747 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

12 Experts available now in Live!

Get 1:1 Help Now