Solved

windows taskbar auto-hide

Posted on 2001-07-11
18
332 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
Gigs: Get Your Project Delivered by an Expert

Select from 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.

 
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

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

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

Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
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…
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.

786 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