Solved

windows taskbar auto-hide

Posted on 2001-07-11
18
335 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…

762 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