auto-hide taskbar

how do i make the windows taskbar auto-hide at runtime?
jchuaAsked:
Who is Participating?
 
CrazyOneConnect With a Mentor Commented:
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
 
CrazyOneCommented:
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
 
intheCommented:
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
Cloud Class® Course: Microsoft Office 2010

This course will introduce you to the interfaces and features of Microsoft Office 2010 Word, Excel, PowerPoint, Outlook, and Access. You will learn about the features that are shared between all products in the Office suite, as well as the new features that are product specific.

 
RickHalleCommented:
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
 
EpsylonCommented:
NOT POSSIBLE NOT POSSIBLE NOT POSSIBLE NOT POSSIBLE NOT POSSIBLE NOT POSSIBLE NOT POSSIBLE NOT POSSIBLE NOT POSSIBLE NOT POSSIBLE NOT POSSIBLE NOT POSSIBLE NOT POSSIBLE NOT POSSIBLE NOT POSSIBLE NOT POSSIBLE NOT POSSIBLE NOT POSSIBLE NOT POSSIBLE NOT POSSIBLE NOT POSSIBLE NOT POSSIBLE NOT POSSIBLE NOT POSSIBLE NOT POSSIBLE NOT POSSIBLE NOT POSSIBLE NOT POSSIBLE NOT POSSIBLE NOT POSSIBLE NOT POSSIBLE NOT POSSIBLE NOT POSSIBLE NOT POSSIBLE NOT POSSIBLE NOT POSSIBLE NOT POSSIBLE NOT POSSIBLE NOT POSSIBLE NOT POSSIBLE NOT POSSIBLE NOT POSSIBLE NOT POSSIBLE NOT POSSIBLE NOT POSSIBLE NOT POSSIBLE NOT POSSIBLE NOT POSSIBLE NOT POSSIBLE NOT POSSIBLE NOT POSSIBLE NOT POSSIBLE NOT POSSIBLE NOT POSSIBLE NOT POSSIBLE NOT POSSIBLE NOT POSSIBLE NOT POSSIBLE NOT POSSIBLE NOT POSSIBLE NOT POSSIBLE NOT POSSIBLE NOT POSSIBLE NOT POSSIBLE NOT POSSIBLE NOT POSSIBLE NOT POSSIBLE NOT POSSIBLE NOT POSSIBLE NOT POSSIBLE NOT POSSIBLE NOT POSSIBLE NOT POSSIBLE NOT POSSIBLE NOT POSSIBLE NOT POSSIBLE NOT POSSIBLE NOT POSSIBLE NOT POSSIBLE NOT POSSIBLE NOT POSSIBLE NOT POSSIBLE NOT POSSIBLE NOT POSSIBLE NOT POSSIBLE NOT POSSIBLE NOT POSSIBLE NOT POSSIBLE NOT POSSIBLE NOT POSSIBLE NOT POSSIBLE NOT POSSIBLE NOT POSSIBLE NOT POSSIBLE NOT POSSIBLE NOT POSSIBLE NOT POSSIBLE NOT POSSIBLE NOT POSSIBLE NOT POSSIBLE NOT POSSIBLE NOT POSSIBLE NOT POSSIBLE NOT POSSIBLE NOT POSSIBLE NOT POSSIBLE NOT POSSIBLE NOT POSSIBLE NOT POSSIBLE NOT POSSIBLE 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
 
jswebyCommented:
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
 
EpsylonCommented:
These Autohide questions will probably end up just like most other question from jchua.....
0
 
intheCommented:
i am requesting all these are deleted,i see no point filling the paqs with them.
0
 
Russell LibbySoftware Engineer, Advisory Commented:
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
 
CrazyOneCommented:
Why delete a question that there is a clear answer to even though the answer is no it is still the answer.
0
 
Russell LibbySoftware Engineer, Advisory Commented:

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
 
CrazyOneCommented:
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
 
Russell LibbySoftware Engineer, Advisory Commented:

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
 
CrazyOneCommented:
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
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.