'显示任务栏 Public Declare Function ShowWindow _ Lib "user32" _ (ByVal HWnd As Long, ByVal nCmdShow As Long) _ As Long'函数名:Show_Or_Hide_DutyBar '参数:ParamFlag '返回值:Boolean '机能:隐藏或显示任务栏 Public Function Show_Or_Hide_DutyBar(ParamFlag As Boolean) Dim hwnd5 As Long hwnd5 = FindWindow("Shell_traywnd", "")
If ParamFlag Then Call ShowWindow(hwnd5, SW_HIDE) Else Call ShowWindow(hwnd5, SW_SHOW) End If
End Function
前面的程序中再加一个API: '查找Windows系统 Public Declare Function FindWindow _ Lib "user32" Alias "FindWindowA" _ (ByVal lpClassName As String, ByVal lpWindowName As String) _ As Long
Public Declare Function ShowWindow _
Lib "user32" _
(ByVal HWnd As Long, ByVal nCmdShow As Long) _
As Long'函数名:Show_Or_Hide_DutyBar
'参数:ParamFlag
'返回值:Boolean
'机能:隐藏或显示任务栏
Public Function Show_Or_Hide_DutyBar(ParamFlag As Boolean) Dim hwnd5 As Long
hwnd5 = FindWindow("Shell_traywnd", "")
If ParamFlag Then
Call ShowWindow(hwnd5, SW_HIDE)
Else
Call ShowWindow(hwnd5, SW_SHOW)
End If
End Function
'查找Windows系统
Public Declare Function FindWindow _
Lib "user32" Alias "FindWindowA" _
(ByVal lpClassName As String, ByVal lpWindowName As String) _
As Long