Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default Bottom of spreadsheet hidden by taskbar in full screen view

If you change Excel to Full Screen View and your taskbar is always on top (as
it normally is), the bottom of the spreadsheet is hidden behind the taskbar.
Does anyone know how to get around this without hiding the taskbar? I have
found that if I drag the taskbar to the bottom and then back up again, the
Excel window resizes itself correctly and the bottom of the spreadsheet is
visible again. Problem is, I want to do this from VBA! Can anyone help
please???

  #2   Report Post  
Posted to microsoft.public.excel.programming
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.

Reply
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
view excel in full screen view JABCR Excel Worksheet Functions 1 April 25th 09 12:39 AM
Full Screen View j_cavanagh Excel Discussion (Misc queries) 5 April 12th 08 12:48 AM
Bottom of spreadsheet hidden in full screen view Mio Excel Discussion (Misc queries) 7 December 8th 05 05:11 PM
Why can I only view my spreadsheet in full screen gloria81101 Excel Discussion (Misc queries) 1 October 14th 05 07:00 PM
open with full screen view AlfD[_3_] Excel Programming 0 May 6th 04 12:14 AM


All times are GMT +1. The time now is 07:02 PM.

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

About Us

"It's about Microsoft Excel"