English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

i want to execute a .exe file how do i do this?
so i want to have a textbox where i type the path to my file and then when i press execute! the file should start!
an example code ?

thanks ;) :)

2007-04-20 23:00:01 · 6 answers · asked by Anonymous in Computers & Internet Programming & Design

please guys i want answers of what i asked not something else :( :(

2007-04-20 23:07:56 · update #1

6 answers

This is what it is in Vb.Net

We have a const "process"
I don't know if your have the same thing...

Dim processStart as New Process
processStart.Start(Path)
I would advise you to send that through an error handling

Or what might help is the Shell()

2007-04-21 05:38:15 · answer #1 · answered by Anonymous · 0 0

First declare

Private Declare Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" (ByVal hwnd As Long, ByVal lpOperation As String, ByVal lpFile As String, ByVal lpParameters As String, ByVal lpDirectory As String, ByVal nShowCmd As Long) As Long
Const SW_SHOW = 5


And then place the below code where you require to launch the program

ShellExecute 0, "OPEN", "Program.exe", "programname", "c:\Program.exe", SW_SHOW


Note: Replace Program.exe with your exe filename and c:\Program.exe with the full path to your exe file

2007-04-21 06:17:07 · answer #2 · answered by Abraham Alex 4 · 0 0

Search Google or Click here :
http://www.google.com/search?client=opera&rls=en&q=free+learning+'Visual+basic+6'&sourceid=opera&ie=utf-8&oe=utf-8

2007-04-21 06:13:20 · answer #3 · answered by Anonymous · 0 0

VB is event programming,

I have repented and joined the GCC.

2007-04-21 06:03:49 · answer #4 · answered by ★Greed★ 7 · 0 0

You can use the shell function to run any .com, .exe, or bat file from within VB

Shell "C:\myProgram.exe"

2007-04-21 14:17:54 · answer #5 · answered by MarkG 7 · 1 0

below link provides u help:
http://www.developerfusion.co.uk/show/11/3/

2007-04-21 06:07:25 · answer #6 · answered by Sairam 2 · 0 0

fedest.com, questions and answers