🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: borland.public.csharpbuilder.language.csharp
3 messages
3 total messages Started by nivekski Tue, 20 Jun 2006 07:28
run external app?
#208
Author: nivekski
Date: Tue, 20 Jun 2006 07:28
9 lines
1048 bytes
HI
In c#buildder what is the best way of launching a external application in 
run & wait mode?

Thanks

-- 
Nevikski
www.kevsbox.com 
Re: run external app?
#210
Author: David Clegg
Date: Tue, 20 Jun 2006 08:19
38 lines
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
Re: run external app?
#213
Author: Starbuck
Date: Wed, 21 Jun 2006 11:31
42 lines
1968 bytes
Thanks

"David Clegg" <dclegg@gmail.com> wrote in message 
news:xn0enpkdokaoj9000@newsgroups.borland.com...
> 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 
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads