Hey DJKarl thanks for the code.
I have a question though. My VBA skills are still developing themselves. Can you tell me which part will go on the Form On Open Event Procedure? I am trying to follow your code but I get a little lost. It appears to me that you are defining variables in this section:
Const ABS_AUTOHIDE = &H1
Const ABS_ONTOP = &H2
Const ABM_SETSTATE = 10
Then you define some variables for "Private Type":
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
I have never used a Private type before so I don't know where to put this.
I don't know what this part does either:
Private Declare Function SHAppBarMessage Lib "shell32.dll" (ByVal dwMessage As Long, pData As APPBARDATA) As Long
I believe that the actual event procedure that goes behind a button or on the on open event procedure is this part:
Sub HideTaskBar()
Dim ABD As APPBARDATA, Ret As Long
ABD.lParam = ABS_AUTOHIDE Or ABS_ONTOP
Ret = SHAppBarMessage(ABM_SETSTATE, ABD)
End Sub
And the Event Procedure to Unhide the Task bar is this part:
Sub UnHideTaskBar()
Dim ABD As APPBARDATA, Ret As Long
ABD.lParam = ABS_ONTOP
Ret = SHAppBarMessage(ABM_SETSTATE, ABD)
End Sub
The problem is that I don't know where to put the variable definitions at the beginning? I have been taught to define the variable at the beginning of the Sub. I have never seen or used a "Private Type" before. Can you break this up for me so that I know where to put each of the parts? I would really appreciate it. This is something that I have been trying to get working for quite some time now. Thanks,
Tyler
