System API

During runtime I would like to hide the task bar using SystemParametersInfo or any other API.
Who is Participating?
Erick37Connect With a Mentor Commented:
Really hide the taskbar:

Option Explicit
Private Const SW_NORMAL = 1
Private Const SW_HIDE = 0
Private Declare Function ShowWindow Lib "user32" (ByVal hWnd As Long, _
     ByVal nCmdShow As Long) As Long
Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" _
     (ByVal lpClassName As String, ByVal lpWindowName As String) As Long

Private Sub TaskBarVisible(bState As Boolean)
    Dim hWnd As Long
    Dim lngState As Long
    hWnd = FindWindow("Shell_TrayWnd", "") ' get window handle
    If hWnd = 0 Then Exit Sub
    If bState Then
      lngState = SW_NORMAL ' show it
      lngState = SW_HIDE ' hide it
    End If
    ShowWindow hWnd, lngState
End Sub
Private Sub Command1_Click()
    Static bVis As Boolean
    bVis = Not bVis
    'Toggle the visible state:
    Call TaskBarVisible(bVis)
End Sub
s_mazumderAuthor Commented:
I would, at the outset, like to thank you for the valuable time you spent for me.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.