Solved

hide/show 95s taskbar,start button,systray

Posted on 1998-12-08
13
304 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
 
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
Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 
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

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

Suggested Solutions

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…
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.

708 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

18 Experts available now in Live!

Get 1:1 Help Now