borderAndreaVB free resources for Visual Basic developersborder

AndreaVB Visual Basic and VB.NET source code resources - Copyright © 1999-2008 Andrea Tincani
:: How to launch the Control Panel Extensions

Author  

Andrea Tincani

Language  

VB5, VB6

Operating Systems  

Windows 95, 98 and NT
Module

Option Explicit

'Launch the Control Panel Window
Public Sub RunControlPanel()
    Shell "rundll32.exe shell32.dll,Control_RunDLL", vbNormalFocus
End Sub

'Launch a Control Panel Extension
Public Sub RunControlPanelExtension(FileName As String)
    Shell "rundll32.exe shell32.dll,Control_RunDLL " & FileName, vbNormalFocus
End Sub

Usage

'Usage: create a form and add a FileListBox and two Command Buttons...
Private Sub Command1_Click()
    RunControlPanelExtension File1.FileName
End Sub

Private Sub Command2_Click()
    RunControlPanel
End Sub

Private Sub Form_Load()
   
'Displays all the Control Panel Extension (*.CPL) files in the System32 path...
    File1.Pattern = "*.CPL"
    File1.FileName = "C:\WINNT\SYSTEM32"
End Sub

:: Navigation

Home

Miscellaneous Tips

Previous Tip

Next Tip

:: Search this site
Google
:: Related Topics
icon 01-11-2004 Re: Window Service by Goran
icon 21-01-2004 Re: Creating an installer.. by yronium
icon 19-11-2002 Re: Win32 API function Launch process on different machine? by vbgen
icon 01-10-2002 Re: copy folder like windows explorer(vba excel 2000) by JLRodgers
Partners: Il portale per lui e lei | Download Actual Software | Free Software Download
borderAndreaVB free resources for Visual Basic developersborder

borderAndreaVB Visual Basic and VB.NET source code resources - Copyright © 1999-2008 Andrea Tincaniborder