EmersonH.Com

Transforming Knowledge into Power

  • Increase font size
  • Default font size
  • Decrease font size
Home VB 6 System Starting an *.exe file

Starting an *.exe file

E-mail Print

1. calculator, which
2. ' is present in every Windows Based PC.
3. 'the command button click() event triggers
4. 'the application to run.
5.
6. 'General Syntax is
RetVal = Shell([Pathname of EXE],[WindowStyle As vbAppWinStyle =
vbMinimisedFocus])
7.
8.
9. '----------------CODE--------------------
Private Sub cmdExec_Click() ' cmdExec is the name of the command
button on any form.
10.
11. Dim RetVal
RetVal = Shell("C:\WINDOWS\System32\calc.exe", 1) ' Run
Calculator.
12.
13.
14. End Sub
15. '---------------------------------------

Last Updated on Monday, 21 December 2009 17:01