Solved

Hide the Taskbar

Posted on 2002-06-21
2
547 Views
Last Modified: 2010-04-04
Is there any delphi 5 routine(or any other way) that I can hide the task bar in Windows 98.
0
Comment
Question by:alshepstone
  • 2
2 Comments
 
LVL 5

Expert Comment

by:alanwhincup
ID: 7098373
Here you are:

// Hide Taskbar
procedure TForm1.Button1Click(Sender: TObject);
var
  H : HWND;
begin
  H := FindWindow('Shell_TrayWnd', nil);
  if H <> 0 then
    ShowWindow(H, SW_HIDE);
end;

// Show Taskbar
procedure TForm1.Button2Click(Sender: TObject);
var
  H : HWND;
begin
  H := FindWindow('Shell_TrayWnd', nil);
  if H <> 0 then
    ShowWindow(H, SW_SHOW);
end;

Cheers,

Alan
0
 
LVL 5

Accepted Solution

by:
alanwhincup earned 50 total points
ID: 7098376
Or if you wish to keep the taskbar visible but disable it then try the below:


// Disable Taskbar
procedure TForm1.Button1Click(Sender: TObject);
var
  H : HWND;
begin
  H := FindWindow('Shell_TrayWnd', nil);
  if H <> 0 then
    EnableWindow(H, False);
end;

// Enable Taskbar
procedure TForm1.Button2Click(Sender: TObject);
var
  H : HWND;
begin
  H := FindWindow('Shell_TrayWnd', nil);
  if H <> 0 then
    EnableWindow(H, True);
end;
0

Featured Post

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

Question has a verified solution.

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

Suggested Solutions

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…
In a recent question (https://www.experts-exchange.com/questions/28997919/Pagination-in-Adobe-Acrobat.html) here at Experts Exchange, a member asked how to add page numbers to a PDF file using Adobe Acrobat XI Pro. This short video Micro Tutorial sh…

831 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