A Console application is an application that presents a console to the user.
The console is the user interface. Therefore, you can't, by definition,
write a console application that doesn't present a cosole to the user. What
you *can* do is write a class library that has a class to perform whatever
task you want to perform. Then you can create a Windows Application that
does not create an instance of a form, but in the Main() function, simply
creates an instance of the class in the class library and calls it to
perform the task.
If you need to be able to use the class in a Console as well, create a
Console application that does the same thing (employs the class library). A
nice trick is to create both the Windows application and the Console
application, and add parameters to the command for the Windows application
that enable it to run in "windowless " mode. What this would do is to either
spawn the Console application as a process, or run without spawning the
Console application, and simply perform the work itself.
--
HTH,
Kevin Spencer
Microsoft MVP
..Net Developer
There's a seeker born every minute.
- Dr. "Happy" Harry Cox
"inpreet" <in*****@gmail. com> wrote in message
news:11******** **************@ g43g2000cwa.goo glegroups.com.. .
I am trying to build a console application in C#.Net. This application
is suppose to run in background without user interaction. How can I
hide console to appear?