PC Review


Reply
Thread Tools Rate Thread

Closing Console Window from code.

 
 
Peter R. Fletcher
Guest
Posts: n/a
 
      31st Jul 2003
I believe that I need to use a Console Application because I need (for
various reasons) to pick up parameters passed to it on the "command
line" by another application that I didn't write and don't have the
source for. It doesn't seem to be possible to do this from a regular
Windows Application, though I would be delighted to be corrected if I
am wrong about this. I don't want or need the Console Window once the
program is started, but I haven't been able to work out how to
minimise or (even better) close it from program code while leaving the
Application running, interacting with the user, where necessary, via
Forms. Can anyone help?


----== Posted via Newsfeed.Com - Unlimited-Uncensored-Secure Usenet News==----
http://www.newsfeed.com The #1 Newsgroup Service in the World! >100,000 Newsgroups
---= 19 East/West-Coast Specialized Servers - Total Privacy via Encryption =---
 
Reply With Quote
 
 
 
 
Gabriele G. Ponti
Guest
Posts: n/a
 
      31st Jul 2003
Peter,

You can get the command line parameters via the
Environment.GetCommandLineArgs method. This method returns a string array of
the command line arguments for the application, so you are not limited to a
console application.

Gabriele


"Peter R. Fletcher" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> I believe that I need to use a Console Application because I need (for
> various reasons) to pick up parameters passed to it on the "command
> line" by another application that I didn't write and don't have the
> source for. It doesn't seem to be possible to do this from a regular
> Windows Application, though I would be delighted to be corrected if I
> am wrong about this. I don't want or need the Console Window once the
> program is started, but I haven't been able to work out how to
> minimise or (even better) close it from program code while leaving the
> Application running, interacting with the user, where necessary, via
> Forms. Can anyone help?
>
>
> ----== Posted via Newsfeed.Com - Unlimited-Uncensored-Secure Usenet

News==----
> http://www.newsfeed.com The #1 Newsgroup Service in the World! >100,000

Newsgroups
> ---= 19 East/West-Coast Specialized Servers - Total Privacy via Encryption

=---


 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Console Window Closing Event LVP Microsoft C# .NET 0 13th May 2008 12:48 AM
Hiding the Console Window from Code zacks@construction-imaging.com Microsoft VB .NET 1 10th Apr 2008 10:05 PM
Closing a window from code behind Jeremy Microsoft ASP .NET 4 22nd Nov 2007 03:31 AM
Closing via Console generates non-zero exit code Peter Oliphant Microsoft VC .NET 1 23rd Nov 2005 02:22 AM
console window closing upon opening =?Utf-8?B?QWx2byB2b24gQ29zc2VsIEk=?= Microsoft VC .NET 3 8th Aug 2005 09:28 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 06:40 PM.