View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Peter Huang [MSFT] Peter Huang [MSFT] is offline
external usenet poster
 
Posts: 225
Default Bottom of spreadsheet hidden by taskbar in full screen view

Hi

Here is the code snippet which will reset the taskbar.
You may have a try.
Commonly this is a Shell issue, for detailed information you may also try
the newsgroup below.
microsoft.public.platformsdk.shell

Private Declare Function SHAppBarMessage Lib "shell32.dll" _
(ByVal dwMessage As Long, _
ByRef pData As APPBARDATA) _
As Long

Private Const ABS_AUTOHIDE As Long = &H1
Private Const ABM_GETTASKBARPOS As Long = &H5
Private Const ABM_GETSTATE As Long = &H4
Private Const ABM_SETSTATE As Long = &HA
Private Const ABM_SETAUTOHIDEBAR As Long = &H8

Private Type RECT
Left As Long
Top As Long
Right As Long
Bottom As Long
End Type

Private Type APPBARDATA
cbSize As Long
hwnd As Long
uCallbackMessage As Long
uEdge As Long
rc As RECT
lParam As Long ' message specific
End Type

Private Function IsTaskbar_AutoHideEnabled() As Boolean
Dim abd As APPBARDATA
Dim Result As Long

IsTaskbar_AutoHideEnabled = False

Call SHAppBarMessage(ABM_GETTASKBARPOS, abd)
Result = SHAppBarMessage(ABM_GETSTATE, abd)
If (Result And ABS_AUTOHIDE) Then
Result = CBool(SHAppBarMessage(ABM_SETAUTOHIDEBAR, abd))
IsTaskbar_AutoHideEnabled = Result
End If
End Function


Sub Test()
Dim abd As APPBARDATA
Dim Result As Long
' Call SHAppBarMessage(ABM_GETTASKBARPOS, abd)
Result = SHAppBarMessage(ABM_GETSTATE, abd)

' Call SHAppBarMessage(ABM_SETAUTOHIDEBAR, abd)
Application.DisplayFullScreen = False
'If IsTaskbar_AutoHideEnabled = False Then
abd.lParam = Result Or ABS_AUTOHIDE
Call SHAppBarMessage(ABM_SETSTATE, abd)
'Else

abd.lParam = Result And Not ABS_AUTOHIDE
Call SHAppBarMessage(ABM_SETSTATE, abd)
'End If
Application.DisplayFullScreen = True

End Sub
Sub Macro1()


End Sub


Best regards,

Peter Huang
Microsoft Online Partner Support

Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.