Open items without an address

I use:
RetVal = Shell(full_address, 1)
to open applications in vb5.
I would also like to open "My Computer" and "Control Panel" and dial-up-networking links by clicking on a listbox item.  How can I do this?
donb1Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

JuiletteCommented:
shell the apropriate in the list1_click event...
if you need the shell what's I'll give them to you...
Which ones.
'Wayne
0
JuiletteCommented:
'here..shell whatever...Use the following snippet to Shell the date/time dialog.
Substitute the codes below for other Control Panel dialogs.
 
 
      Call Shell("rundll32.exe shell32.dll,Control_RunDLL _ timedate.cpl")


 
Couldn't be much easier, could it? The only trick is knowing the "secret code" for each dialog.
Now, while the above will bring up the date/time dialog, your VB app will have no way of knowing when that dialog has been dismissed.
For the answer to that, go to my Samples page and download Shell32.zip which shows several methods you can use to "shell and wait."
So, what are the secret codes? Here ya go...
 
Control Panel (CONTROL.EXE)
 
Control Panel:  
    rundll32.exe shell32.dll,Control_RunDLL
 
 
Accessability Settings (ACCESS.CPL)
 
Accessability Properties (Keyboard):  
    rundll32.exe shell32.dll,Control_RunDLL access.cpl,,1
 
Accessability Properties (Sound):  
    rundll32.exe shell32.dll,Control_RunDLL access.cpl,,2
 
Accessability Properties (Display):  
    rundll32.exe shell32.dll,Control_RunDLL access.cpl,,3
 
Accessability Properties (Mouse):  
    rundll32.exe shell32.dll,Control_RunDLL access.cpl,,4
 
Accessability Properties (General):  
    rundll32.exe shell32.dll,Control_RunDLL access.cpl,,5
 
 
Add/Remove Programs (APPWIZ.CPL)
 
Add/Remove Programs Properties (Install/Uninstall):  
    rundll32.exe shell32.dll,Control_RunDLL appwiz.cpl,,1
 
Add/Remove Programs Properties (Windows Setup):  
    rundll32.exe shell32.dll,Control_RunDLL appwiz.cpl,,2
 
Add/Remove Programs Properties (Startup Disk):  
    rundll32.exe shell32.dll,Control_RunDLL appwiz.cpl,,3
 
 
Display Settings (DESK.CPL)
 
Display Properties (Background):  
    rundll32.exe shell32.dll,Control_RunDLL desk.cpl,,0
 
Display Properties (Screen Saver):  
    rundll32.exe shell32.dll,Control_RunDLL desk.cpl,,1
 
Display Properties (Appearance):  
    rundll32.exe shell32.dll,Control_RunDLL desk.cpl,,2
 
Display Properties (Settings):  
    rundll32.exe shell32.dll,Control_RunDLL desk.cpl,,3
 

--------------------------------------------------------------------------------
 
Display Properties (Install Screen Saver):  
    rundll32.exe desk.cpl,InstallScreenSaver %1
    (opens .scr at location specified by %1 in preview window)
 
 
FindFast Settings (FINDFAST.CPL)
 
Find Fast Properties (General):  
    rundll32.exe shell32.dll,Control_RunDLL findfast.cpl
 
 
Internet Settings (INETCPL.CPL)
 
Internet Properties (General):  
    rundll32.exe shell32.dll,Control_RunDLL inetcpl.cpl,,0
 
Internet Properties (Security):  
    rundll32.exe shell32.dll,Control_RunDLL inetcpl.cpl,,1
 
Internet Properties (Content):  
    rundll32.exe shell32.dll,Control_RunDLL inetcpl.cpl,,2
 
Internet Properties (Connection):  
    rundll32.exe shell32.dll,Control_RunDLL inetcpl.cpl,,3
 
Internet Properties (Programs):  
    rundll32.exe shell32.dll,Control_RunDLL inetcpl.cpl,,4
 
Internet Properties (Advanced):  
    rundll32.exe shell32.dll,Control_RunDLL inetcpl.cpl,,5
 
 
Regional Settings (INTL.CPL)
 
Regional Settings Properties (Regional Settings):  
    rundll32.exe shell32.dll,Control_RunDLL intl.cpl,,0
 
Regional Settings Properties (Number):  
    rundll32.exe shell32.dll,Control_RunDLL intl.cpl,,1
 
Regional Settings Properties (Currency):  
    rundll32.exe shell32.dll,Control_RunDLL intl.cpl,,2
 
Regional Settings Properties (Time):  
    rundll32.exe shell32.dll,Control_RunDLL intl.cpl,,3
 
Regional Settings Properties (Date):  
    rundll32.exe shell32.dll,Control_RunDLL intl.cpl,,4
 
Regional Settings Properties (Input Locales):  
    rundll32.exe shell32.dll,Control_RunDLL intl.cpl,,5
 
 
Joystick Settings (JOY.CPL)
 
Joystick Properties (Joystick):  
    rundll32.exe shell32.dll,Control_RunDLL joy.cpl
 
 
Mouse/Keyboard/Printers/Fonts Settings (MAIN.CPL)
 
Mouse Properties:  
    rundll32.exe shell32.dll,Control_RunDLL main.cpl @0
 
Keyboard Properties:  
    rundll32.exe shell32.dll,Control_RunDLL main.cpl @1
 
Printers:  
    rundll32.exe shell32.dll,Control_RunDLL main.cpl @2
 
Fonts:  
    rundll32.exe shell32.dll,Control_RunDLL main.cpl @3
 
 
Mail and Fax Settings (MLCFG32.CPL)
 
Microsoft Exchange/Outlook Properties (General):  
    rundll32.exe shell32.dll,Control_RunDLL mlcfg32.cpl
 
 
Multimedia/Sounds Settings (MMSYS.CPL)
 
Multimedia Properties (Audio):  
    rundll32.exe shell32.dll,Control_RunDLL mmsys.cpl,,0
 
Multimedia Properties (Video):  
    rundll32.exe shell32.dll,Control_RunDLL mmsys.cpl,,1
 
Multimedia Properties (MIDI):  
    rundll32.exe shell32.dll,Control_RunDLL mmsys.cpl,,2
 
Multimedia Properties (CD Music):  
    rundll32.exe shell32.dll,Control_RunDLL mmsys.cpl,,3
 
Multimedia Properties (Advanced/Devices):  
    rundll32.exe shell32.dll,Control_RunDLL mmsys.cpl,,4
 

--------------------------------------------------------------------------------
 
Sounds Properties:  
    rundll32.exe shell32.dll,Control_RunDLL mmsys.cpl @1
 
 
Modem Settings (MODEM.CPL)
 
Modem Properties (General):  
    rundll32.exe shell32.dll,Control_RunDLL modem.cpl
 
 
Network Settings (NETCPL.CPL / NCPA.DLL)
 
Network (Configuration):  
    Win9x: rundll32.exe shell32.dll,Control_RunDLL netcpl.cpl
    WinNT: rundll32.exe shell32.dll,Control_RunDLL ncpa.cpl
 

--------------------------------------------------------------------------------
 
Dial-up Networking Wizard
    Win9x: rundll32.exe rnaui.dll,RnaWizard
 

--------------------------------------------------------------------------------
 
Create Share Dialog
    WinNT: rundll32.exe ntlanui.dll,ShareCreate
 
Manage Shares Dialog
    WinNT: rundll32.exe ntlanui.dll,ShareManage
 
 
ODBC Settings (ODBCCP32.CPL)
 
ODBC Data Source Administrator (General):  
    rundll32.exe shell32.dll,Control_RunDLL odbccp32.cpl
 
 
Password Settings (PASSWORD.CPL)
 
Password Properties (Change Passwords):  
    Win9x: rundll32.exe shell32.dll,Control_RunDLL password.cpl
 
 
COM Ports Settings (PORTS.CPL)
 
COM Ports Properties (General):  
    WinNT: rundll32.exe shell32.dll,Control_RunDLL ports.cpl
 
 
Server Properties (SRVMGR.CPL)
 
Server Properties (General):  
    WinNT: rundll32.exe shell32.dll,Control_RunDLL srvmgr.cpl
 
 
System Settings (SYSDM.CPL)
 
System Properties (General):  
    rundll32.exe shell32.dll,Control_RunDLL sysdm.cpl,,0
 
System Properties (Device Manager):  
    Win9x: rundll32.exe shell32.dll,Control_RunDLL sysdm.cpl,,1
 
System Properties (Performance):  
    Win9x: rundll32.exe shell32.dll,Control_RunDLL sysdm.cpl,,3
    WinNT: rundll32.exe shell32.dll,Control_RunDLL sysdm.cpl,,1
 
System Properties (Environment):  
    WinNT: rundll32.exe shell32.dll,Control_RunDLL sysdm.cpl,,2
 
System Properties (Startup/Shutdown):  
    WinNT: rundll32.exe shell32.dll,Control_RunDLL sysdm.cpl,,3
 
System Properties (Hardware Profiles):  
    Win95: rundll32.exe shell32.dll,Control_RunDLL sysdm.cpl,,2
    WinNT: rundll32.exe shell32.dll,Control_RunDLL sysdm.cpl,,4
 
System Properties (User Profiles):  
    WinNT: rundll32.exe shell32.dll,Control_RunDLL sysdm.cpl,,5
 

--------------------------------------------------------------------------------
 
Add New Hardware Wizard:  
    Win9x: rundll32.exe shell32.dll,Control_RunDLL sysdm.cpl @1
 
Add New Printer Wizard:  
    Win9x: rundll32.exe shell32.dll,SHHelpShortcuts_RunDLL AddPrinter
 
 
Telephony Settings (TELEPHON.CPL)
 
Dialing Properties (My Location / Drivers):  
    WinNT: rundll32.exe shell32.dll,Control_RunDLL telephon.cpl
 
 
Themes Settings (THEMES.CPL)
 
Themes Properties (General):  
    rundll32.exe shell32.dll,Control_RunDLL themes.cpl
 
 
Time and Date Settings (TIMEDATE.CPL)
 
Date/Time Properties:  
    rundll32.exe shell32.dll,Control_RunDLL timedate.cpl
 
Choose Time Zone:  
    rundll32.exe shell32.dll,Control_RunDLL timedate.cpl,,/f
 
 
TweakUI Settings (TWEAKUI.CPL)
 
TweakUI Dialog (General):  
    rundll32.exe shell32.dll,Control_RunDLL tweakui.cpl
 
 
UPS Settings (UPS.CPL)
 
Uninteruptable Power Supply Properties (General):  
    WinNT: rundll32.exe shell32.dll,Control_RunDLL ups.cpl
 
 
Microsoft Mail Postoffice Settings (WGPOCPL.CPL)
 
Microsoft Workgroup Postoffice Admin:  
    rundll32.exe shell32.dll,Control_RunDLL wgpocpl.cpl
 
 
Miscellaneous File System Dialogs and Wizards
 
Open With (File Associations):  
    rundll32.exe shell32.dll,OpenAs_RunDLL d:\path\filename.ext
 
Run Diskcopy Dialog:
    rundll32 diskcopy.dll,DiskCopyRunDll
 
Create New Shortcut Wizard:
    rundll32.exe AppWiz.Cpl,NewLinkHere %1
    (creates shortcut at location specified by %1)
 
Create a Briefcase:
    rundll32.exe syncui.dll,Briefcase_Create
 
View Fonts:
    rundll32.exe shell32.dll,SHHelpShortcuts_RunDLL FontsFolder
 
View Printers:
    rundll32.exe shell32.dll,SHHelpShortcuts_RunDLL PrintersFolder
 
 

--------------------------------------------------------------------------------
 

0
donb1Author Commented:
Juilette
That list is really great.  What would I use to open the "My Computer" or to be the same as double clicking on a connection in dial-up-networking?
0
JuiletteCommented:
Dim res
Dim Connection
Connection = "Interlog"         'dial up name(my computer)
res = Shell("rundll32.exe rnaui.dll,RnaDial " _
& Connection, 1)
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Visual Basic Classic

From novice to tech pro — start learning today.