Solved

Hide the Taskbar

Posted on 2002-06-21
2
550 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

Networking for the Cloud Era

Join Microsoft and Riverbed for a discussion and demonstration of enhancements to SteelConnect:
-One-click orchestration and cloud connectivity in Azure environments
-Tight integration of SD-WAN and WAN optimization capabilities
-Scalability and resiliency equal to a data center

Question has a verified solution.

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

This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

839 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