'Open New Project. Add module and 2 buttons.
'Write down these public declaration into the module.
Declare Function SetWindowPos Lib "user32" (ByVal hwnd As Long, ByVal hWndInsertAfter As Long, ByVal x As Long, ByVal y As Long, ByVal cx As Long, ByVal cy As Long, ByVal wFlags As Long) As Long
Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long
Public Const SWP_HIDEWINDOW = &H80
Public Const SWP_SHOWWINDOW = &H40

'Write down the codes below in the form

Private Sub Form_Load()
Command1.Caption = "Show Task Bar"
Command2.Caption = "Hide Task Bar"
End Sub

Private Sub Command1_Click()
t& = FindWindow("Shell_traywnd", "")
i& = SetWindowPos(t&, 0, 0, 0, 0, 0, SWP_SHOWWINDOW)
End Sub
Private Sub Command2_Click()
t& = FindWindow("Shell_traywnd", "")
i& = SetWindowPos(t&, 0, 0, 0, 0, 0, SWP_HIDEWINDOW)
End Sub