Solved

hide/show 95s taskbar,start button,systray

Posted on 1998-12-08
13
308 Views
Last Modified: 2010-08-05
I have seen numerous apps on the web that can individually
hide the start button ,taskbar and or the systray in 95.

I have also seen apps that allow a user to click anywhere on the desktop and have the start menu appear @ that location.

how is all this done? if its not too time consuming some
sample code would be much appreciated.
-thanks in advance.
0
Comment
Question by:brentlingermd
  • 7
  • 4
  • 2
13 Comments
 
LVL 3

Expert Comment

by:williams2
ID: 1349926
Are you familiar with window handles brentlingermd?
It would be easier for you to understand, if you are familar with window handles, because every control you see got one.

About your question:
I can explain a bit about how it is done, and I've got severel examples on how to use systray, hiding taskbar (but not the Start button)

Regards,
Williams
0
 

Author Comment

by:brentlingermd
ID: 1349927
yes im somewhat familiar w/ handles. please tell me more, examples would be great.
0
 
LVL 3

Expert Comment

by:williams2
ID: 1349928
If you would please supply your email, then I could send you some freeware components with source, I think that is the easiest way of doing it.

Regards,
Williams
0
Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

 
LVL 3

Expert Comment

by:williams2
ID: 1349929
The tasbar is a window like all other windows.

You can also find more about trayicons at this URL: (find tray or systray on the page and download, there's more than one example!)

ftp.cised.unina.it/pub/Pcibm/borland/delphi/32free/

For hiding the taskbar, download zip at this URL:

http://torry.tsg.edu.ee/samples/samples/mddi.zip

Regards,
Williams
0
 
LVL 3

Expert Comment

by:williams2
ID: 1349930
The tasbar is a window like all other windows.

You can also find more about trayicons at this URL: (find tray or systray on the page and download, there's more than one example!)

ftp.cised.unina.it/pub/Pcibm/borland/delphi/32free/

For hiding the taskbar, download zip at this URL:

http://torry.tsg.edu.ee/samples/samples/mddi.zip

Regards,
Williams
0
 

Author Comment

by:brentlingermd
ID: 1349931
I found the mddi.zip file and it should help with the hiding of
the taskbar (thanks).

I think that you misunderstood about my sysytem tray question, I would like to hide it from the task bar OR preferably be able to create it as seperate window.

Perhaps I should tell you what I would like to ultamatly end up w/.Have you ever seen or heard of LiteStep (http://www.litestep.net)or AfterStep? I would like to have a desktop interface similar to that, while still using explorer as the 95 shell.

brentlin@purdue.edu is my address if youd like to send me some components.
0
 
LVL 3

Expert Comment

by:williams2
ID: 1349932
If my guesses is right, you want to build a custom desktop? doing it all by your command?

Regards,
Williams
0
 
LVL 4

Expert Comment

by:BoRiS
ID: 1349933
brentlingermd

To hide the taskbar and startbutton etc is easy here is the code to do that

procedure TForm1.Button1Click(Sender: TObject);//hide taskbar
var
  hw: HWND;
begin
  hw := FindWindow('Shell_Traywnd', nil);
   if hw <> 0 then
    if IsWindowVisible(hw) then
      ShowWindow(hw, SW_HIDE)
    else
      ShowWindow(hw, SW_SHOW);
end;

procedure TForm1.Button2Click(Sender: TObject);//hide start button...
var
  hBut, hw: HWND;
begin
  hw := FindWindow('Shell_Traywnd', nil);
    hBut := FindWindowEx(hw, 0, 'Button', nil);
    if hBut <> 0 then
     if IsWindowVisible(hBut) then
      ShowWindow(hBut, SW_HIDE)
    else
      ShowWindow(hBut, SW_SHOW);
end;

procedure TForm1.Button3Click(Sender: TObject);//hide system tray...
var
  hsys, hw: HWND;
begin
  hw := FindWindow('Shell_Traywnd', nil);
    hSys := FindWindowEx(hw, 0, 'TrayNotifyWnd', nil);
    if hSys <> 0 then
     if IsWindowVisible(hSys) then
      ShowWindow(hSys, SW_HIDE)
    else
      ShowWindow(hSys, SW_SHOW);
end;

To popup the start menu you need to use this code, what I would do first is get the handle of the listview on the desktop as that is all your desktop is, then popup the start menu and set it's posision...

//get the listhandle of the desktop
function GetDesktopListViewHandle: THandle;
  var
    S: String;
  begin
  Result := FindWindow('ProgMan', nil);
  Result := GetWindow(Result, GW_CHILD);
  Result := GetWindow(Result, GW_CHILD);
  SetLength(S, 40);
  GetClassName(Result, PChar(S), 39);
  if PChar(S) <> 'SysListView32' then Result := 0;
  end;

//then call the function and popup the start menu...
procedure TForm1.Button4Click(Sender: TObject);
begin
   GetDesktopListViewHandle;
    SendMessage(GetDesktopWindow, WM_SYSCOMMAND, SC_TASKLIST, 0);
end;

Hope this all helps...

Later
BoRiS
0
 

Author Comment

by:brentlingermd
ID: 1349934
BoRiS,
The code you submitted was great and worked fine. Thanks for your help. but im a bit confused where you mentioned that you would "call the function and set its position" how do you set the position? Id like to have the user be able to click on the desktop and have the start menu popup @ the location @ which they clicked.

Also I know i didnt state this in my original question but besides hiding the taskbar and systray i would like to be able to place them each in individual windows that the user could move around, show hide etc....
0
 
LVL 3

Expert Comment

by:williams2
ID: 1349935
Hey brentlingermd!!!

Boris DID answer you question!! Go give him the points. In my oppinion he deserves the best credits for this. If you want to ask him further questions, then ask a new question or go leave him a comment instead of rejecting his answer!!!!
0
 

Author Comment

by:brentlingermd
ID: 1349936
Calm down williams2....
I fully intend to give BoRiS all the points that i initially offered. I simply wanted to know if he was kind enough to offer addional info. When i last revisted this question i though my only options were to accept or reject the answer. I knew if i accepted there was probably little interest for anyone to add addional comments. Maybe im in the wrong and if so i apoligize, if your are getting all excited about it just have him resubmit an answer and we'll just forget all about it..
0
 
LVL 3

Expert Comment

by:williams2
ID: 1349937
Nope, I'm not getting all excitet, but new Users seem to do this a lot :-) .

You are at a place, where it's ok to continue asking questions, even though an answer has been locked or accepted. You will be surprised about the interest.

But let's say another user comes here to answer the question, and he knows he is right (and we know he is right), he will get confused when you reject the second answer. What I mean is, As long as the question is open, every user here got the option to answer it, when you keep it locked, you can ask as many questions as you like.

Instead of rejecting, you should keep the question locked instead.

But anyway, welcome to the hardcore Delphi exchange.

Cheers,
Williams
0
 
LVL 4

Accepted Solution

by:
BoRiS earned 100 total points
ID: 1349938
brentlingermd

The way to get the position of the cursor to popup the start menu at, is to use the API GetCursorPos this will give you the exact x/y points example....

var
Pt: TPoint;
begin
 GetCursorPos(Pt.x, Pt.y);
end;

Williams2
Thank you for the support there :-)

I have sent this as an answer, to keep it locked as williams2 suggested...

Later
BoRiS
0

Featured Post

What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

Question has a verified solution.

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

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…
Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
This Micro Tutorial will teach you how to censor certain areas of your screen. The example in this video will show a little boy's face being blurred. This will be demonstrated using Adobe Premiere Pro CS6.
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

810 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