What's Here?
- Members: 149,036
- Replies: 505,390
- Topics: 79,610
- Snippets: 2,663
- Tutorials: 705
- Total Online: 1,708
- Members: 81
- Guests: 1,627
|
This is a simple line of code to run a .exe application from VB6.
|
Submitted By: Xenon
|
|
Rating:
   
|
|
Views: 25,241 |
Language: Visual Basic
|
|
Last Modified: October 27, 2005 |
|
Instructions: take a form and add a command button to it, name it as cmdExec. |
Snippet
'I have made the code to run the calculator, which
' is present in every Windows Based PC.
'the command button click() event triggers
'the application to run.
'General Syntax is
RetVal = Shell([Pathname of EXE],[WindowStyle As vbAppWinStyle = vbMinimisedFocus])
'----------------CODE--------------------
Private Sub cmdExec_Click() ' cmdExec is the name of the command button on any form.
Dim RetVal
RetVal = Shell("C:\WINDOWS\System32\calc.exe", 1) ' Run Calculator.
End Sub
'---------------------------------------
Copy & Paste
|
|
|
Be Social
Reference Sheets
Bye Bye Ads
Monthly Drawing
Top Contributors
Top 10 Kudos This Month
|