You can hide console window but will need PInvoke for this. Just send
relevant message with SendMessage to console window for which you can get
the handle using GetConsoleWindow.
If you want to close console before closing application, you can use Win32
API console allocation / deallocation functions, however this I did not
test - you might want to experiment with this. Check Platform SDK Console
functions sections.
I found so far only one glitch which I can't solve in Net 2.0 - when VS runs
application it leaves orphan cmd.exe after application closes. Problem is
manifesting itself only in VS 2005 environment, not in previous versions.
HTH
Alex
"Giojo" <gi*****@gmail.com> wrote in message
news:11**********************@o13g2000cwo.googlegr oups.com...
Hello guys!
I can't resolve this problem.. I want my programm in c# working with
only console if there are some parameters, but if someone make
double-click on the exe I want to start the graphic GUI without the
black console on background..
Now I check if there are some parameters and if there aren't parameters
I run the GUI (with the black console that remain..). If I choose
Windows application on Visual Studio, when I run the application from
Console (with parameters) I lose all Console.Write messages... Have you
got a suggestion/trick?!
Thank you to all!
Giojo