Home
Search
 
What's New
Index
Books
Links
Q & A
Newsletter
Banners
 
Feedback
Tip Jar
 
C# Helper...
 
XML RSS Feed
Follow VBHelper on Twitter
 
 
MSDN Visual Basic Community
 
 
 
 
 
TitleMake a program display a control panel applet
Keywordscontrol panel, applet
CategoriesWindows, Utilities
 
Use the Shell statement to execute a command of the form:

    Shell "rundll32.exe shell32.dll,Control_RunDLL XXX,,#"

Where XXX is the name of the applet's control string and # is the index of the applet tab you want to display. For example, this statement displays the first tab in the Accessibility Options applet:

    Shell "rundll32.exe shell32.dll,Control_RunDLL access.cpl,,1"

Not all of these will work on all systems because you may not have every applet installed.

I was also unable to get the Font Folder and Printers applets to work. Let me know if you get them working.

 
' Display the applet.
Private Sub cmdGo_Click()
    Shell "rundll32.exe shell32.dll,Control_RunDLL " & _
        m_CommandStrings(cboApplet.ListIndex + 1) & _
        ",," & Format$(txtTab.Text)

    If (Err.Number <> 0) Or (Err.LastDllError <> 0) Then
        MsgBox "Error displaying applet" & vbCrLf & _
            Err.Description, vbExclamation, "Error"
    End If
End Sub
 
 
Copyright © 1997-2010 Rocky Mountain Computer Consulting, Inc.   All rights reserved.
  Updated