jchua
asked on
Autohide Taskbar
Hello how do i make the taskbar auto hide during runtime?
This is not possible.
Yes it is. Button1 hides the taskbar, button2 shows it again.
procedure TForm1.Button1Click(Sender : TObject);
var
hTaskbar: THandle;
begin
hTaskbar := FindWindow('Shell_TrayWnd' , Nil);
ShowWindow(hTaskbar, SW_HIDE);
end;
procedure TForm1.Button2Click(Sender : TObject);
var
hTaskbar: THandle;
begin
hTaskbar := FindWindow('Shell_TrayWnd' , Nil);
ShowWindow(hTaskbar, SW_SHOWNORMAL);
end;
J.
procedure TForm1.Button1Click(Sender
var
hTaskbar: THandle;
begin
hTaskbar := FindWindow('Shell_TrayWnd'
ShowWindow(hTaskbar, SW_HIDE);
end;
procedure TForm1.Button2Click(Sender
var
hTaskbar: THandle;
begin
hTaskbar := FindWindow('Shell_TrayWnd'
ShowWindow(hTaskbar, SW_SHOWNORMAL);
end;
J.
That is 'hiding' the taskbar, not 'turning on autohide', which I think jchua wants...
Epsylon, I think I see your point although I'm sure jchua is probably just looking for a way to auto-hide the taskbar when his program runs, then (maybe) show it again when it finishes. You're right though, I've found no way of actually turning the "auto-hide" feature on and off.
J.
J.
Hello
Epsylon, I don't think that's Imposible, I think that can done by SHAppBarMessage API with ABM_SETAUTOHIDEBAR, but I really didn't that, take a look at microsoft site
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/shellcc/platform/Shell/Messages/ABM_SETAUTOHIDEBAR.asp
and look at the win32 sdk help file for SHAppBarMessage api
Mohammed Nasman
Epsylon, I don't think that's Imposible, I think that can done by SHAppBarMessage API with ABM_SETAUTOHIDEBAR, but I really didn't that, take a look at microsoft site
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/shellcc/platform/Shell/Messages/ABM_SETAUTOHIDEBAR.asp
and look at the win32 sdk help file for SHAppBarMessage api
Mohammed Nasman
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
I saw a code for access the task bar, but it was not in delphi, and I lost the link cuz i'm not interested in vc++, i didn't remember if that api or funcation, it called accesstaskbar or register
It is NOT POSSIBLE!
I've been searching the net for this a year ago and did NOT find a solution.
I've been searching the net for this a year ago and did NOT find a solution.
So then, my solution posted above is the nearest you can get to auto-hiding the taskbar. I think this is a better way anyway, you shouldn't really change the user's settings, just hide & show the taskbar when you want to.
J.
J.
Epsylon I think you are right, as I told I dont' have a good knowledage about these API, and I thought it done by that
Mohammed
Mohammed
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.
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.
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 Epsylon'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
I will leave a recommendation in the Cleanup topic area that this question is:
Accept Epsylon'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