Solved

windows taskbar auto-hide

Posted on 2001-07-11
18
333 Views
Last Modified: 2010-04-06
Hi there,

How do i make the Windows Taskbar auto-hide during run time?

Any help would be greatly appreciated.

Thanks,
Gladz
0
Comment
Question by:gladz
  • 6
  • 5
  • 2
  • +3
18 Comments
 
LVL 44

Expert Comment

by:CrazyOne
ID: 6275388
var
  hTaskBarWindow : HWnd;

begin
  hTaskBarWindow:=FindWindow('Shell_TrayWnd',nil);
  if hTaskBarWindow<>0 then
    ShowWindow(hTaskBarWindow, SW_HIDE);//SW_SHOW to unhide
end;
0
 
LVL 44

Expert Comment

by:CrazyOne
ID: 6275393
Now if you are asking to set the Auto-Hide property of the TaskBar then this cannot be done.
0
 
LVL 44

Expert Comment

by:CrazyOne
ID: 6275398
Note that there are only two messages associated with the "Auto hide" and niether one of them will set
the Auto Hide state. So what you ask is virtually impossible to do.

From the Win32 Programmer's reference

QUOTE

Taskbar Display Options

The taskbar supports two display options: Auto hide and Always on top. To set these options, open the
taskbar shortcut menu, click Properties, and select or clear the Auto hide check box or the Always on
top check box. To retrieve the state of these display options, use the ABM_GETSTATE message. If you
would like to be notified when the state of these display options changes, process the ABN_STATECHANGE
notification message in your window procedure.

The work area is the portion of the screen not obscured by the taskbar. To retrieve the size of the
work area, call the SystemParametersInfo function with SPI_GETWORKAREA. To retrieve the rectangle coordinates
that describe the location of the taskbar, use the ABM_GETTASKBARPOS message.

UNQUOTE


The Crazy One
0
Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
LVL 22

Expert Comment

by:Mohammed Nasman
ID: 6275821
gladz, that's impossible

  some one ask the same questions and gave many points but till now no one answer, cuz the only answer, not possible

Mohammed
0
 
LVL 13

Expert Comment

by:Epsylon
ID: 6275829
That's right. It's impossible.
0
 
LVL 22

Expert Comment

by:Mohammed Nasman
ID: 6275838
Epsylon, I was waiting you to say that, cuz you lead the last conversation about this subject ;)
0
 
LVL 20

Expert Comment

by:Madshi
ID: 6275911
Well, let's say: It's impossible with documented means. With hacking around you can make impossible things possible. But no, I don't have anything at hand for this question. I guess, one would have to reverse-engeneer (or how was this written again?) shell32.dll or explorer.exe or both. And that again for each OS version around. So better forget about that...   :-/

Regards, Madshi.
0
 
LVL 3

Expert Comment

by:rondi
ID: 6279728
OFCOURSE IT'S POSSIBLE!!!!
Why are you guys so negative ??

Just a sec while I do some research....
0
 
LVL 13

Expert Comment

by:Epsylon
ID: 6279793
> Why are you guys so negative ??

You will know in a sec   :o)
0
 
LVL 3

Expert Comment

by:rondi
ID: 6279843
I believe the API call you need is SHAppBarMessage.

Below is some code to get the AutoHide state (courtesy of chami.com). I thought the solution would be to just look up the API declaration and adapt the code to set the state, perhaps using ABM_SETSTATE, but no such constant exists!! (according to MSDN).

Maybe if you've got some tool to hook windows messages,
you can monitor the messages & params that get sent to the
appbar when a user sets AutoHide on/off.


uses ShellAPI;

(*
  Returns TRUE if taskbar auto hide is on.

  if(IsTaskBarautoHideOn)then
  begin
    // auto hide is ON
  end;
*)
function IsTaskbarAutoHideOn : boolean;
var
  ABData : TAppBarData;
begin
  ABData.cbSize := sizeof(ABData);
  Result :=
    (SHAppBarMessage(ABM_GETSTATE, ABData)
     and ABS_AUTOHIDE) > 0;
end;

0
 
LVL 13

Expert Comment

by:Epsylon
ID: 6279857
Rondi, the taskbar is protected against changing the autohide state...
0
 
LVL 44

Accepted Solution

by:
CrazyOne earned 100 total points
ID: 6280671
As has been stated at least a hundred times in various other threads here at EE and at other Web sites and so eloquently said by Epsylon on numerous occassions especially at this link:
http://www.experts-exchange.com/jsp/qShow.jsp?ta=delphi&qid=20141400

NOT POSSIBLE NOT POSSIBLE NOT POSSIBLE NOT POSSIBLE NOT POSSIBLE NOT POSSIBLE NOT POSSIBLE NOT POSSIBLE NOT POSSIBLE NOT POSSIBLE NOT POSSIBLE NOT POSSIBLE NOT POSSIBLE NOT POSSIBLE NOT POSSIBLE NOT POSSIBLE NOT POSSIBLE NOT POSSIBLE NOT POSSIBLE NOT POSSIBLE NOT POSSIBLE NOT POSSIBLE NOT POSSIBLE NOT POSSIBLE NOT POSSIBLE NOT POSSIBLE NOT POSSIBLE NOT POSSIBLE NOT POSSIBLE NOT POSSIBLE NOT POSSIBLE NOT POSSIBLE NOT POSSIBLE NOT POSSIBLE NOT POSSIBLE NOT POSSIBLE NOT POSSIBLE NOT POSSIBLE NOT POSSIBLE NOT POSSIBLE NOT POSSIBLE NOT POSSIBLE NOT POSSIBLE NOT POSSIBLE NOT POSSIBLE NOT POSSIBLE NOT POSSIBLE NOT POSSIBLE NOT POSSIBLE NOT POSSIBLE NOT POSSIBLE NOT POSSIBLE NOT POSSIBLE NOT POSSIBLE NOT POSSIBLE NOT POSSIBLE NOT POSSIBLE NOT POSSIBLE NOT POSSIBLE NOT POSSIBLE NOT POSSIBLE NOT POSSIBLE NOT POSSIBLE NOT POSSIBLE NOT POSSIBLE NOT POSSIBLE NOT POSSIBLE NOT POSSIBLE NOT POSSIBLE NOT POSSIBLE NOT POSSIBLE NOT POSSIBLE NOT POSSIBLE NOT POSSIBLE NOT POSSIBLE NOT POSSIBLE NOT POSSIBLE NOT POSSIBLE NOT POSSIBLE NOT POSSIBLE NOT POSSIBLE NOT POSSIBLE NOT POSSIBLE NOT POSSIBLE NOT POSSIBLE NOT POSSIBLE NOT POSSIBLE NOT POSSIBLE NOT POSSIBLE NOT POSSIBLE NOT POSSIBLE NOT POSSIBLE NOT POSSIBLE NOT POSSIBLE NOT POSSIBLE NOT POSSIBLE NOT POSSIBLE NOT POSSIBLE NOT POSSIBLE NOT POSSIBLE NOT POSSIBLE NOT POSSIBLE NOT POSSIBLE NOT POSSIBLE NOT POSSIBLE NOT POSSIBLE NOT POSSIBLE NOT POSSIBLE NOT POSSIBLE NOT POSSIBLE NOT POSSIBLE NOT POSSIBLE NOT POSSIBLE NOT POSSIBLE NOT POSSIBLE NOT POSSIBLE NOT POSSIBLE NOT POSSIBLE NOT POSSIBLE NOT POSSIBLE NOT POSSIBLE NOT POSSIBLE


Now can we please put this Q to bed? :>)
0
 
LVL 13

Expert Comment

by:Epsylon
ID: 6280715
I think I'm going to ? that  :o)
0
 
LVL 13

Expert Comment

by:Epsylon
ID: 6280717
What??? EE converts the (c)-sign to a ?
0
 
LVL 44

Expert Comment

by:CrazyOne
ID: 6280745
Epsylon are you using MS Word?
0
 
LVL 13

Expert Comment

by:Epsylon
ID: 6280824
No, I didn't use it to get the ?-sign...

There are more of those annoying bugs. All lines that start with one or more spaces loose one space. Long lines are cut-off with a <br> while HTML can take care of that automatically.
0
 
LVL 26

Expert Comment

by:Russell Libby
ID: 8702800
No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this question is:

Accept CrazyOne's comment as answer

Please leave any comments here within the next seven days.
 
PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!
 
Thank you,
Russell

EE Cleanup Volunteer
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
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…
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used.

766 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