Re: Console app to exit itself?
- From: "Willy Denoyette [MVP]" <willy.denoyette@xxxxxxxxxx>
- Date: Thu, 6 Oct 2005 00:20:16 +0200
I know, but you run this from within VS (F5) isn't it? Try to run it from a
command prompt.
Willy.
"Ronnie Smith" <smith_ronnie@xxxxxxxxxxxxxxxx> wrote in message
news:8944D6E1-55D8-4F3F-99BA-020AE6A1AE70@xxxxxxxxxxxxxxxx
> Hi Willy,
>
> Thanks for your suggestion but it doesn't seem to make any difference.
> The message actually appears in the console window after it has completed.
> Even in the release version.
>
> Ronnie
>
> "Willy Denoyette [MVP]" wrote:
>
>>
>> "Ronnie Smith" <smith_ronnie@xxxxxxxxxxxxxxxx> wrote in message
>> news:43A13B0D-1215-40A4-BDE1-C1CD3200FAAE@xxxxxxxxxxxxxxxx
>> > Hi,
>> >
>> > I have a console app written in C# to kill a certain process. I don't
>> > want
>> > the console to come to the foreground when run and I want it to exit
>> > itself
>> > without waiting for the 'Press any key to continue' prompt at the end.
>> >
>> > How can I run it so that it is hidden and once it has completed exits
>> > quietly by itself?
>> >
>> > Many thanks,
>> >
>> > Ronnie
>>
>> Set the ProcessStartInfo WindowStyle property to
>> ProcessWindowStyle.Hidden
>> like this...
>>
>> ProcessStartInfo startInfo = new ProcessStartInfo(".....");
>> startInfo.WindowStyle = ProcessWindowStyle.Hidden;
>>
>> The "press any key to..." comes from the debugger windows isn't it?
>>
>>
>> Willy.
>>
>>
>>
>>
.
- References:
- Re: Console app to exit itself?
- From: Willy Denoyette [MVP]
- Re: Console app to exit itself?
- Prev by Date: Re: C# convention
- Next by Date: Re: C# convention
- Previous by thread: Re: Console app to exit itself?
- Next by thread: DataViewManager
- Index(es):
Relevant Pages
|