Hide the Desktop
Add a new module (modMain). Copy the following code into the general declarations procedure:
Option Explicit DefLng A-Z Declare Function FindWindowEx Lib "user32" _ Alias "FindWindowExA" (ByVal hWnd As Long, _ ByVal hWndChild As Long, _ ByVal lpszClassName As String, _ ByVal lpszWindow As String) As Long Declare Function ShowWindow Lib "user32" _ (ByVal hWnd As Long, _ ByVal nCmdShow As Long) As Long '-- Constants for ShowWindow() Public Const SW_HIDE = 0 Public Const SW_NORMAL = 1 Public Const SW_SHOWMINIMIZED = 2 Public Const SW_SHOWMAXIMIZED = 3 Public Const SW_SHOWNOACTIVATE = 4 Public Const SW_SHOW = 5 Public Const SW_MINIMIZE = 6 Public Const SW_SHOWMINNOACTIVE = 7 Public Const SW_SHOWNA = 8 Public Const SW_RESTORE = 9 Public Const SW_SHOWDEFAULT = 10 '-- Names of the shell window we'll be looking for Public Const g_cstrShellViewWnd As String = "Progman"
Page 2 of 3
This article was originally published on November 20, 2002