Solved

auto-hide taskbar

Posted on 2001-06-25
15
407 Views
Last Modified: 2010-04-04
how do i make the windows taskbar auto-hide at runtime?
0
Comment
Question by:jchua
  • 5
  • 3
  • 2
  • +3
15 Comments
 
LVL 44

Expert Comment

by:CrazyOne
ID: 6226297
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
 
LVL 44

Accepted Solution

by:
CrazyOne earned 300 total points
ID: 6226300
As you can see even Microsoft indicates the only way to set this is by using the OS's built in interface and cannot be done programmatically.
0
 
LVL 17

Expert Comment

by:inthe
ID: 6226308
you cant do that..

quote from microsoft:

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/shellcc/shellcc/shell/Shell_Int/Taskbar.asp

"
The taskbar supports two display options: Auto Hide and Always On Top. To set these options, the user must open the taskbar shortcut menu, click Properties, and select or clear the Auto Hide check box or the Always On Top check box. There is no way to set these options programmatically.

"
you can only make your own shappbar's autohide by using setstate function.
0
 
LVL 2

Expert Comment

by:RickHalle
ID: 6226421
Depending on what you are doing you can hide the taskbar at runtime. (Not autohide though) Here are 3 functions/procedures for working with the taskar. Be careful if you use them though because you can hide the taskbar and then if your app crashes it will still be hidden.

// Check to see if autohide is on or not.
Uses : ShellApi;
function IsTaskbarAutoHideOn : boolean;
var
  ABData : TAppBarData;
begin
  ABData.cbSize := sizeof(ABData);
  Result := (SHAppBarMessage(ABM_GETSTATE, ABData) and ABS_AUTOHIDE) > 0;
end;

// Hide the task bar
procedure HideTaskBar;
var
  WindowHandle       : THandle;
  windowclass        : Array [0..20] of char;
begin
StrPCopy ( @windowclass[0] , 'Shell_TrayWnd' );  // the second parameter is the class name
WindowHandle := FindWindow ( @windowclass[0] , nil  );
ShowWindow ( WindowHandle , SW_HIDE );
end;

// Show the task bar
procedure ShowTaskBar;
var
  WindowHandle       : THandle;
  windowclass        : Array [0..20] of char;
begin
StrPCopy ( @windowclass[0] , 'Shell_TrayWnd' );  // the second parameter is the class name
WindowHandle := FindWindow ( @windowclass[0] , nil  );
ShowWindow ( WindowHandle , SW_SHOW );
end;

Rick
0
 
LVL 13

Expert Comment

by:Epsylon
ID: 6226507
NOT POSSIBLE NOT POSSIBLE NOT POSSIBLE NOT POSSIBLE NOT POSSIBLE NOT POSSIBLE NOT POSSIBLE NOT POSSIBLE NOT POSSIBLE NOT POSSIBLE NOT POSSIBLE NOT POSSIBLE NOT POSSIBLE NOT POSSIBLE NOT POSSIBLE NOT POSSIBLE NOT POSSIBLE NOT POSSIBLE NOT POSSIBLE NOT POSSIBLE NOT POSSIBLE NOT POSSIBLE NOT POSSIBLE NOT POSSIBLE NOT POSSIBLE NOT POSSIBLE NOT POSSIBLE NOT POSSIBLE NOT POSSIBLE NOT POSSIBLE NOT POSSIBLE NOT POSSIBLE NOT POSSIBLE NOT POSSIBLE NOT POSSIBLE NOT POSSIBLE NOT POSSIBLE NOT POSSIBLE NOT POSSIBLE NOT POSSIBLE NOT POSSIBLE NOT POSSIBLE NOT POSSIBLE NOT POSSIBLE NOT POSSIBLE NOT POSSIBLE NOT POSSIBLE NOT POSSIBLE NOT POSSIBLE NOT POSSIBLE NOT POSSIBLE NOT POSSIBLE NOT POSSIBLE NOT POSSIBLE NOT POSSIBLE NOT POSSIBLE NOT POSSIBLE NOT POSSIBLE NOT POSSIBLE NOT POSSIBLE NOT POSSIBLE NOT POSSIBLE NOT POSSIBLE NOT POSSIBLE NOT POSSIBLE NOT POSSIBLE NOT POSSIBLE NOT POSSIBLE NOT POSSIBLE NOT POSSIBLE NOT POSSIBLE NOT POSSIBLE NOT POSSIBLE NOT POSSIBLE NOT POSSIBLE NOT POSSIBLE NOT POSSIBLE NOT POSSIBLE NOT POSSIBLE NOT POSSIBLE NOT POSSIBLE NOT POSSIBLE NOT POSSIBLE NOT POSSIBLE NOT POSSIBLE NOT POSSIBLE NOT POSSIBLE NOT POSSIBLE NOT POSSIBLE NOT POSSIBLE NOT POSSIBLE NOT POSSIBLE NOT POSSIBLE NOT POSSIBLE NOT POSSIBLE NOT POSSIBLE NOT POSSIBLE NOT POSSIBLE NOT POSSIBLE NOT POSSIBLE NOT POSSIBLE NOT POSSIBLE NOT POSSIBLE NOT POSSIBLE NOT POSSIBLE NOT POSSIBLE NOT POSSIBLE NOT POSSIBLE NOT POSSIBLE NOT POSSIBLE NOT POSSIBLE NOT POSSIBLE NOT POSSIBLE NOT POSSIBLE NOT POSSIBLE NOT POSSIBLE NOT POSSIBLE NOT POSSIBLE NOT POSSIBLE NOT POSSIBLE NOT POSSIBLE NOT POSSIBLE
0
 
LVL 4

Expert Comment

by:jsweby
ID: 6226698
jchua, no matter how many times you post this question, you will not find a solution as inthe has shown from his quote from Microsoft. My answer to your first posting of this question shows you how to show and hide it when you like, but you cannot set the auto-hide property yourself.

J.
0
 
LVL 13

Expert Comment

by:Epsylon
ID: 6226939
These Autohide questions will probably end up just like most other question from jchua.....
0
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 
LVL 17

Expert Comment

by:inthe
ID: 6874790
i am requesting all these are deleted,i see no point filling the paqs with them.
0
 
LVL 26

Expert Comment

by:Russell Libby
ID: 8685426
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:

To be deleted / no points refunded

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

Expert Comment

by:CrazyOne
ID: 8687807
Why delete a question that there is a clear answer to even though the answer is no it is still the answer.
0
 
LVL 26

Expert Comment

by:Russell Libby
ID: 8690550

CrazyOne,

I realize that "no" is the answer for this question; but my reasoning is that this question has been PAQ'd before (multiple times i believe). Thus the recommendation for the delete / no points refunded. Plus after the 2yr span since the question was asked, and 1yr since the last posting, I had considered this question abandoned.

If you disagree with this, then please post a comment for the moderators under Community Support, and have them take a look at this.

Thank you,
Russell

EE Cleanup Volunteer
0
 
LVL 44

Expert Comment

by:CrazyOne
ID: 8691346
Yes I do disagree. PAQ'ing a question that has been PAQ'ed even 1,000 times should never figure into whether question should be deleted or not. If the question is answered it belongs in the PAQ and the Expert or Experts who answeed that question should be awarded points. That is the way EE is designed and patented. :>)
0
 
LVL 26

Expert Comment

by:Russell Libby
ID: 8691883

CrazyOne,
I have posted a request for the moderators to look at this Q as well. Please refer to http://www.experts-exchange.com/Community_Support/Q_20643189.html

I still hold by my recommedation though.

1.) In a 2 day span, jchua asked this question 3X. Please refer to the following links:

http://www.experts-exchange.com/Programming/Programming_Languages/Delphi/Q_20140981.html
(06.24.2001)

http://www.experts-exchange.com/Programming/Programming_Languages/Delphi/Q_20141056.html
(06.25.2001)

2.) The second of those links ended up being PAQ'd. That is where the Delete recommendation comes from. (it was asked 4hrs before this one)

3.) The "no refund" recommendation comes from the jchua asking this question multiple times (and clogging this TA), in hopes of finding an answer that is different than the answer he got; even though there is NO solution to his problem, and had been told this MULTIPLE times by MULTIPLE experts before you. Compound that with the fact that he left these questions without closing them for 2 yrs, as well as the other 5 questions he still has unlocked.

----

Regards,
Russell

0
 
LVL 44

Expert Comment

by:CrazyOne
ID: 8693493
Well that is up to the mods. But if duplicates were posted and the Experts didn't see the duplicates then that falls on the questioner and the duplicate question should have been asked to be deleted within the 24 hours. Since it was not deleting a question that has an answer in a case like this is punishing the Experts for a questioners mistake and lack of follow up.
0

Featured Post

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

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…
Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
This video discusses moving either the default database or any database to a new volume.
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.

746 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

10 Experts available now in Live!

Get 1:1 Help Now