04-27-2011, 02:17 PM
Hi,
The following vba code sets the taskbar to autohide or not. How would I convert this to Quick Macros?
Thanks!
Tony
The following vba code sets the taskbar to autohide or not. How would I convert this to Quick Macros?
Public Declare Function SHAppBarMessage Lib "shell32" (ByVal dwMessage As Long, pData As APPBARDATA) As Long
Public Const ABM_GETSTATE = &H4
Public Const ABM_SETSTATE = &HA
Public Const ABS_AUTOHIDE = &H1
Public Const ABS_ALWAYSONTOP = &H2
Public Type RECT
Left As Long
Top As Long
Right As Long
Bottom As Long
End Type
Public Type APPBARDATA
cbSize As Long
hwnd As Long
uCallbackMessage As Long
uEdge As Long
rc As RECT
lParam As Long
End Type
Sub SetTaskbarAutohide(state As Boolean)
Dim ABD As APPBARDATA
ABD.cbSize = Len(ABD)
SHAppBarMessage ABM_GETSTATE, ABD
If state Then
ABD.lParam = ABS_AUTOHIDE
Else
ABD.lParam = ABS_ALWAYSONTOP
End If
SHAppBarMessage ABM_SETSTATE, ABD
End Sub
Thanks!
Tony