LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 175
Default Controlling the windows taskbar from VBA (API example)

I found this code on another post and it works perfectly... however (see below)

Private Declare Function FindWindowEx& Lib "user32" Alias "FindWindowExA" _
(ByVal hWnd1&, ByVal hWnd2&, ByVal lpsz1$, ByVal lpsz2$)
Private Declare Function ShowWindow& Lib "user32" (ByVal hwnd&, ByVal
nCmdShow&)

Sub TaskBar_Hide()
ShowWindow FindWindowEx(0, 0, "Shell_TrayWnd", vbNullString), 0
End Sub

Sub TaskBar_Show()
ShowWindow FindWindowEx(0, 0, "Shell_TrayWnd", vbNullString), 5
End Sub

However,
This seems to be setting a visible flag for the task bar. What I need is to
activate/deactivate the minimize of the task bar. (When you position the
mouse on the top line of the task bar, you get a double-headed arrow. when
you click-drag down, it minimizes the task bar. This leaves a small line
which is the top of the task bar that you can grab and drag up to un-minimize
the task bar).

How do I access that feature from VBA (using API or not)

I need this so that when I set my spreadsheet to show fullscreen, the status
bar gets hidden under the taskbar (becuse I want to leave it set "always on
top") I have found that manually minimizing then maximizing the taskbar
forces the status bar to show (I.E. the spreadsheet's full screen becomes
limited at the bottom to force both the taskbar and the (excel) statusbar to
be both visible.)

Also Im curious what the & in the above "FindWindowEx&" API call code does.
The code stops working when that character is removed.

--
Regards,
John
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
i want all windows in one excel frame (windows in taskbar) Subramanya Excel Discussion (Misc queries) 1 December 18th 09 03:14 PM
Windows Taskbar Jeff Setting up and Configuration of Excel 0 August 21st 08 05:08 PM
Windows in taskbar George Tattam Excel Discussion (Misc queries) 2 March 13th 06 10:31 AM
windows in taskbar jrlatt Setting up and Configuration of Excel 3 June 9th 05 02:09 PM
Controlling the windows taskbar from VBA? John Keith[_2_] Excel Programming 0 April 9th 05 04:57 PM


All times are GMT +1. The time now is 09:41 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"