hide/show 95s taskbar,start button,systray

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.
brentlingermdAsked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
BoRiSConnect With a Mentor Commented:
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
 
williams2Commented:
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
 
brentlingermdAuthor Commented:
yes im somewhat familiar w/ handles. please tell me more, examples would be great.
0
Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

 
williams2Commented:
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
 
williams2Commented:
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
 
williams2Commented:
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
 
brentlingermdAuthor Commented:
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
 
williams2Commented:
If my guesses is right, you want to build a custom desktop? doing it all by your command?

Regards,
Williams
0
 
BoRiSCommented:
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
 
brentlingermdAuthor Commented:
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
 
williams2Commented:
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
 
brentlingermdAuthor Commented:
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
 
williams2Commented:
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
All Courses

From novice to tech pro — start learning today.