Article View: borland.public.csharpbuilder.language.csharp
Article #210Re: run external app?
From: David Clegg
Date: Tue, 20 Jun 2006 08:19
Date: Tue, 20 Jun 2006 08:19
38 lines
1913 bytes
1913 bytes
nivekski wrote:
> In c#buildder what is the best way of launching a external
> application in run & wait mode?
The following should work :-
using System;
using System.Diagnostics;
namespace ProcessTester
{
class Class
{
[STAThread]
static void Main(string[] args)
{
Process process = new Process();
process.StartInfo.FileName = "notepad.exe";
process.Start();
process.WaitForExit(System.Threading.Timeout.Infinite);
Console.WriteLine("Terminated");
}
}
}
--
Cheers,
David Clegg
dclegg@gmail.com
http://cc.borland.com/Author.aspx?ID=72299
QualityCentral. The best way to bug Borland about bugs.
http://qc.borland.com
"All right, brain. You don't like me and I don't like you, but let's
just do this and I can get back to killing you with beer." - Homer
Simpson
Technical Details
Message-ID:
<xn0enpkdokaoj9000@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news2.google.com!news3.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!wns13feed!worldnet.att.net!208.48.142.85!newsfeed.news2me.com!newsfeed.media.kyoto-u.ac.jp!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mailReferences:
<4497a3b7$1@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 1efe35,e8bbb08fd6c120bd
X-Google-Attributes: gid1efe35,public
X-Google-Language: ENGLISH,ASCII-7-bit
From: "David Clegg" <dclegg@gmail.com>
Subject: Re: run external app?
Newsgroups: borland.public.csharpbuilder.language.csharp
References: <4497a3b7$1@newsgroups.borland.com>
Date: Tue, 20 Jun 2006 20:19:25 +1200
User-Agent: XanaNews/1.18.1.3
X-Face: d0!4zUWIBj<CO5m0`=Vu"m.2)(~|1-4:I]5n5<OE<hv+kK)Z:n<h&MnW9t_{}>cw&gbV#f>mHS4h1mcw[cz:R#J,T;)w/($:2Vl5CQnFP(c\wmN0rSvn25.kmVpCmqb]gj7l9ZP+O4+a+P~L#]4s""Tx^zQ/N"#'/?lV?SHpdR\5(iNj.,I_YMfF=/_3.JWAs3
Message-ID: <xn0enpkdokaoj9000@newsgroups.borland.com>
X-Ref: newsgroups.borland.com ~XNS:00000F58
NNTP-Posting-Host: 222.153.59.41
X-Trace: newsgroups.borland.com 1150791560 222.153.59.41 (20 Jun 2006 01:19:20 -0700)
Lines: 38
Path: arc1-ca.pugleaf.net!g2news2.google.com!news3.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!wns13feed!worldnet.att.net!208.48.142.85!newsfeed.news2me.com!newsfeed.media.kyoto-u.ac.jp!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail