March 8, 2021
Hot Topics:

Unlocking the Secrets of the ShellDocVwCtl

  • By John Percival
  • Send Email »
  • More Articles »


Sub ControlPanelItem(szDir As String)

This allows you to open a control panel applet on the default page. The possible ones are:

Accessibility Options (ACCESS.CPL)
Add/Remove Programs (APPWIZ.CPL)
Display Options (DESK.CPL)
Regional Settings (INTL.CPL)
Joystick Options (JOY.CPL)
Mouse/Keyboard/Printers/Fonts Options (MAIN.CPL)
Mail and Fax Options ( MLCFG32.CPL )
Multimedia/Sounds Options ( MMSYS.CPL )
Modem Options (MODEM.CPL)
Network Options (NETCPL.CPL)
Password Options (PASSWORD.CPL)
System/Add New Hardware Options (SYSDM.CPL)
Date and Time Options (TIMEDATE.CPL)
Microsoft Mail Postoffice Options (WGPOCPL.CPL)

Some of these may not be available on your computer, and you may have some extra 3rd party ones. For example:



Sub Explore(vDir)

This opens an explorer window for the directory specified on vDir. For example:

' will open an explorer window of C:


Sub FileRun()

This opens up the run dialog, which you get from the start menu. For example:

ShellControl.FileRun ' will show the run dialog box

FindComputer, FindFiles

Sub FindComputer()
Sub FindFiles()

These methods open up the find dialogs accessible from the start menu. For example:

' will open up the find files dialog box.

MinimizeAll, UndoMinimizeAll

Sub MinimizeAll()
Sub UndoMinimizeALL()

These both do the same as clicking right button on the task bar, and selecting the respective item. 'MinimizeAll' minimizes all windows, and 'UndoMinimizeAll' will undo the previous MinimizeAll command. For example:



Sub Open(vDir)

This opens the folder specified in vDir in a default window. For example:



Sub SetTime()

This opens the set time/date dialog box, the same as the one displayed by double clicking on the clock in the system tray. For example:



Sub ShutdownWindows()

This opens the shutdown windows dialog box, which you get by clicking on shutdown on the start menu.  For example:



Sub Suspend()

This suspends the computer and goes into power saving mode. It may not work if you do not have power saving turned on. For example:


Page 2 of 3

This article was originally published on November 20, 2002

Enterprise Development Update

Don't miss an article. Subscribe to our newsletter below.

Thanks for your registration, follow us on our social networks to keep up-to-date