Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Languages / Managed C++ / June 2004

Tip: Looking for answers? Try searching our database.

Run a console application from a form application

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Emmanouel - 09 Jun 2004 18:41 GMT
Hello there

how do i set up a window menu in a window application to run a console application
Michiel - 10 Jun 2004 10:53 GMT
> Hello there,
>
> how do i set up a window menu in a window application to run a console application?

Add a MainMenu control to the form using the Toolbox and for running an
application do
Process::Start(S"myconsoleapp.exe");
Emmanouel - 10 Jun 2004 11:40 GMT
Thanks michiel for the reply,

Meanwhile i found more options as to how to run an exe from my form .....

That is , there is WinExec, CreateProcess and Process::Start that all can run an exe from my application.

Can anyone tell me the best way or which one of the above is the best.....

I would like to run the exe in the background, without interfering with the form of the application. The background process creates a file that would be used by the windows application.

> > Hello there,
> >
[quoted text clipped - 4 lines]
> application do
> Process::Start(S"myconsoleapp.exe");
Michiel - 10 Jun 2004 11:48 GMT
Personally, I'd use Process:Start to make the code as managed as possible.
One of it's implementations uses the ProcessStartInfo structure, which has
various interesting properties such as CreateNoWindow that'd satisfy your
goals.

> Thanks michiel for the reply,
>
[quoted text clipped - 5 lines]
>
> I would like to run the exe in the background, without interfering with the form of the application. The background process creates a file that
would be used by the windows application.

> > > Hello there,
> > >
[quoted text clipped - 4 lines]
> > application do
> > Process::Start(S"myconsoleapp.exe");
Emmanouel - 10 Jun 2004 16:58 GMT
Thanks michiel

I also used Process:close to free up resources when the process ended.

Thank you again

> Personally, I'd use Process:Start to make the code as managed as possible.
> One of it's implementations uses the ProcessStartInfo structure, which has
[quoted text clipped - 22 lines]
> > > application do
> > > Process::Start(S"myconsoleapp.exe");

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.