From www.allapi.net:

VB Code:
  1. Declare Function SetWindowPos Lib "user32" (ByVal hwnd _
  2. As Long, ByVal hWndInsertAfter As Long, ByVal x As Long, _
  3. ByVal y As Long, ByVal cx As Long, ByVal cy As Long, ByVal _
  4. wFlags As Long) As Long        
  5.  
  6. Declare Function FindWindow Lib "user32" Alias _
  7. "FindWindowA" (ByVal lpClassName As String, ByVal _
  8. lpWindowName As String) As Long
  9.  
  10. Const SWP_HIDEWINDOW = &H80
  11. Const SWP_SHOWWINDOW = &H40        
  12.  
  13. Code to Hide the Taskbar
  14.  
  15. Dim Thwnd as Long
  16. Thwnd = FindWindow("Shell_traywnd", "")
  17. Call SetWindowPos(Thwnd, 0, 0, 0, 0, 0, SWP_HIDEWINDOW)        
  18.  
  19. Code to Show the Taskbar
  20.  
  21. Dim Thwnd as Long
  22. Thwnd = FindWindow("Shell_traywnd", "")
  23. Call SetWindowPos(Thwnd, 0, 0, 0, 0, 0, SWP_SHOWWINDOW)