 |

08-08-2004, 11:48 AM
|
 |
Regular
|
|
Join Date: Aug 2003
Location: Florida
Posts: 83
|
|
Running an EXE...
|
I want my program so when i push a button i runs lets say C:\test.exe.
So when i push the button the application goes like normal. I DO NOT want to run using my application i just want it to run.
|
|

08-08-2004, 12:03 PM
|
 |
Senior Contributor
|
|
Join Date: Jul 2003
Location: Barcelona (SPAIN)
Posts: 1,054
|
|
|
Use Shell function for executing another programs.
What do you mean with "I DO NOT want to run using my application i just want it to run"??
|
__________________
01000011011010000110000101110010011011000110100101100101
~ En mi vida sólo hay dos días que no me importan: ayer y mañana ~
|

08-08-2004, 01:44 PM
|
 |
Retread
Retired Moderator * Expert *
|
|
Join Date: Sep 2002
Location: Austin, Texas
Posts: 6,742
|
|
I think he means it should run standalone... The Shell function will do that just like charlie said - as long as you send the second parameter with vbNormalFocus. (Or you could go fancy and use ShellExecute)
|
|

08-09-2004, 05:10 PM
|
 |
Regular
|
|
Join Date: Aug 2003
Location: Florida
Posts: 83
|
|
shell thing
|
I used that shell execute thing and it didn't work. I know i wrote the correc location of the file, but it still doesn't work...any ideas :/
|
|

08-09-2004, 08:51 PM
|
 |
Retread
Retired Moderator * Expert *
|
|
Join Date: Sep 2002
Location: Austin, Texas
Posts: 6,742
|
|
Define doesn't work. Also, can you show us what code you have? Again, Shell will work fine, ShellExecute is just to be fancy.
|
|

08-09-2004, 09:53 PM
|
 |
Contributor
|
|
Join Date: May 2004
Location: Ohio, USA
Posts: 771
|
|
lol...Mike you love that ShellExecute, everytime I say Shell you come back with ShellExecute!
Well, this time, it's my turn
Code:
Private Sub Command1_Click()
Shell "C:\Program.exe", vbNormalFocus
End Sub
This will open the form, and bring it to the frnt.
KISS = Keep It Short and Simple
For some people Mike, you have to kiss
|
__________________
Brandon
Once you embrace the idea that your customers deserve to die...
...it frees your mind to invent splendidly profitable products - Dogbert
|

08-09-2004, 09:57 PM
|
|
Senior Contributor
|
|
Join Date: Oct 2002
Location: Dubai & Srilanka (Jaffna)
Posts: 1,151
|
|
|
The fancy of the ShellExecute is no need to give the associate application name to run/open a program/File, it will take the default application to run the program/File. ShellExecute is more KISS
|
|

08-09-2004, 10:14 PM
|
 |
Contributor
|
|
Join Date: May 2004
Location: Ohio, USA
Posts: 771
|
|
|
If its an .exe, then you only need the path to it, nothing else, it will run with just that....for a file, if you want to open it in its proper viewer, or specify one, then ShellExecute would be better. However in this case, its an .exe, so Shell works for him.
|
__________________
Brandon
Once you embrace the idea that your customers deserve to die...
...it frees your mind to invent splendidly profitable products - Dogbert
|
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
|
|
|
| Thread Tools |
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|
|
|