Attribute VB_Name = "modFunctions"
Private Const SW_HIDE As Long = 0
Private Const SW_SHOW As Long = 5
Private Const GW_CHILD As Long = 5
Private Declare Function GetWindow Lib "User32.dll" (ByVal hwnd As Long, ByVal wCmd As Long) As Long
Public Declare Function FindWindow Lib "User32.dll" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long
Public Declare Function ShowWindow Lib "User32.dll" (ByVal hwnd As Long, ByVal nCmdShow As Long) As Long
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
Declare Function SwapMouseButton& Lib "user32" (ByVal bSwap As Long)
Declare Function mciSendString Lib "winmm.dll" Alias "mciSendStringA" (ByVal lpstrCommand As String, ByVal lpstrReturnString As String, ByVal uReturnLength As Long, ByVal hwndCallback As Long) As Long
Public Sub ShowTaskBar(Visible As Boolean)
ShowWindow FindWindow("Shell_TrayWnd", ""), (IIf(Visible, SW_SHOW, SW_HIDE))
End Sub
Public Sub ShowDesktop(Visible As Boolean)
Dim DesktopWnd As Long
DesktopWnd = FindWindow("Progman", "Program Manager")
DesktopWnd = GetWindow(DesktopWnd, GW_CHILD)
ShowWindow DesktopWnd, (IIf(Visible, SW_SHOW, SW_HIDE))
End Sub