CaitlinRoberts
asked on
Programmatically resize Windows taskbar
Does anyone know how to programmatically resize the Windows taskbar?
I'm trying to "minimize" the taskbar to allow for a IE browser based application to take up the entire screen. I've been able to hide the taskbar using the following code:
ShowWindow(FindWindow("She ll_TrayWnd ", vbnullString), SW_HIDE)
But that does not allow for other windows to be resized where the toolbar used to be. But if I manually resize the taskbar to be minimized, then I can make my app fit the entire screen.
Any suggestions?
I'm trying to "minimize" the taskbar to allow for a IE browser based application to take up the entire screen. I've been able to hide the taskbar using the following code:
ShowWindow(FindWindow("She
But that does not allow for other windows to be resized where the toolbar used to be. But if I manually resize the taskbar to be minimized, then I can make my app fit the entire screen.
Any suggestions?
If you're using IE have you considered putting it into full screen mode? Press F11 in IE to see what I mean...
ASKER
Yes, that's a great suggestion. However, as part of amy requirements I need to disable the minimize, maximize, close, and IE toolbar functions. And it seems like the only way to do this without opening a new window is by resizing the window and moving it so that the toolbar is out of sight. Although that's not the best of solutions, it's all I have to work with right now.
So right now, I can move the browser to hide the IE toolbar. And I can hide the toolbar using the ShowWindow(FindWindow("she ll_trayWnd ",null), SW_HIDE) command, but if I use that command, I cannot resize the window to cover the portion of the screen where the taskbar used to be.
So right now, I can move the browser to hide the IE toolbar. And I can hide the toolbar using the ShowWindow(FindWindow("she
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Bob,
Thanks for post! Looks exactly like what I needed. I'm just having a little trouble get it to work.
I get a "Object reference not set to an instance of an object" error when it's trying to call the SetAppBarMessage method. Any suggestions?
Thanks!
Caitlin
Thanks for post! Looks exactly like what I needed. I'm just having a little trouble get it to work.
I get a "Object reference not set to an instance of an object" error when it's trying to call the SetAppBarMessage method. Any suggestions?
Thanks!
Caitlin
ASKER
Bob,
I've got it!! It looks like it didn't like the ByVal in:
Private Declare Function SetAppBarMessage Lib "shell32" Alias "SHAppBarMessage" _
(ByVal dwMessage As Integer, ByVal pData As APPBARDATA) As Integer
...for the pData.
It seems like it need to be passed in by reference. Thanks so much for your help, you have no idea how long I've been working on this problem!
I've got it!! It looks like it didn't like the ByVal in:
Private Declare Function SetAppBarMessage Lib "shell32" Alias "SHAppBarMessage" _
(ByVal dwMessage As Integer, ByVal pData As APPBARDATA) As Integer
...for the pData.
It seems like it need to be passed in by reference. Thanks so much for your help, you have no idea how long I've been working on this problem!