如何隐藏任务栏

解决方案 »

  1.   

    Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" _
            (ByVal lpClassName As String, ByVal lpWindowName As String) As Long
    Private Declare Function FindWindowEx Lib "user32" Alias "FindWindowExA" _
            (ByVal hWnd1 As Long, ByVal hWnd2 As Long, ByVal lpsz1 As String, _
            ByVal lpsz2 As String) As Long
    Private Declare Function ShowWindow Lib "user32" (ByVal hwnd As Long, _
            ByVal nCmdShow As Long) As Long'定义窗口以及子窗口的类名
    Const sTrayWindow = "Shell_TrayWnd"
    Const sTrayNotify = "TrayNotifyWnd"
    Const sStartButton = "Button"
    Const sAppSwitchBar = "ReBarWindow32"
    Const sAppSwitch = "MSTaskSwWClass"
    Const sAppIcon = "ToolbarWindow32"
    Const sTrayClock = "TrayClockWClass"
    Const sDesktopIcon = "ShellDll_DefView"
    Const sProgman = "Progman"Dim wnd As Long
    wnd = FindWindowEx(wnd, 0, sStartButton, vbNullString)