Programming Forums

Programming Forums (http://www.programmingforums.org/forumindex.php)
-   Visual Basic (http://www.programmingforums.org/forum18.html)
-   -   external .exe (http://www.programmingforums.org/showthread.php?t=14804)

jgrossm1 Dec 25th, 2007 11:54 AM

external .exe
 
hey, i'm new to visual basic, and was wondering what is the best way to run an external .exe file that I created from a Visual Basic program. I'm doing this purely for fun, and I've come across the Shell() function already, and it works, but does anyone know of other ways?

PhilBon Dec 26th, 2007 8:57 PM

Re: external .exe
 
why don't you just use the code for the EXE in your own program?
look at system processes.

jgrossm1 Dec 26th, 2007 9:18 PM

Re: external .exe
 
Quote:

Originally Posted by PhilBon (Post 138757)
why don't you just use the code for the EXE in your own program?
look at system processes.

by this im guessing you mean basically just transposing the source code of my C program to Visual Basic? If thats it, then its because the program I wrote has a rather significant amount of computation within it, which C is better suited for, as opposed to the ease of use, organization, and creation of a sophisticated graphical interface quickly that Visual Basic has worked well for in the past for me. If thats not what you were saying, please correct me, but thank you for the response.

Either way, does anyone else have any other ideas? Thanks

Dameon Dec 26th, 2007 9:22 PM

Re: external .exe
 
You can wrap the functions you need in to a DLL and import them in the same way as windows api calls.

PhilBon Dec 26th, 2007 9:34 PM

Re: external .exe
 
Quote:

Originally Posted by jgrossm1 (Post 138698)
hey, i'm new to visual basic, and was wondering what is the best way to run an external .exe file that I created from a Visual Basic program. I'm doing this purely for fun, and I've come across the Shell() function already, and it works, but does anyone know of other ways?

I'm sorry, my understanding was that both programs were written in VB. System.Processes should deal with starting and stopping current processes. If you need I can look up a program i made that would do this.

jgrossm1 Dec 26th, 2007 10:18 PM

Re: external .exe
 
Quote:

Originally Posted by PhilBon (Post 138760)
I'm sorry, my understanding was that both programs were written in VB. System.Processes should deal with starting and stopping current processes. If you need I can look up a program i made that would do this.

No, that's alright, but thank you for the effort. I'm still working on learning Visual Basic, and only recently started, so I imagine if nothing else I will come across other ways at some point. Either way, there is the Shell() command, which does the job, if rather inelegantly.

Still, thank you for the responses


All times are GMT -5. The time now is 8:11 PM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC