Solved

auto-hide taskbar

Posted on 2001-06-25
15
408 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
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Windows Drag & Drop Location 2 94
add combobox item based on numbers 9 122
Comparing dates in Delphi. Greater than/ Less than 3 115
Adoquery sql  left join does not work 25 80
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…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…
A company’s greatest vulnerability is their email. CEO fraud, ransomware and spear phishing attacks are the no1 threat to a company’s security. Cybercrime is responsible for the largest loss of money to companies today with losses projected to r…

919 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

17 Experts available now in Live!

Get 1:1 Help Now