What's Here?
- Members: 131,932
- Replies: 470,202
- Topics: 72,877
- Snippets: 2,538
- Tutorials: 664
- Total Online: 1,825
- Members: 74
- Guests: 1,751
Who's Online?
|
This is a simple line of code to run a .exe application from VB6.
|
Submitted By: Xenon
|
|
Rating:
   
|
|
Views: 23,147 |
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
|
|
|
Reference Sheets
Bye Bye Ads
Free DIC T-Shirt
Related Sites
Monthly Drawing
Partners
Top Contributors
Top 10 Kudos This Month
|