views:

172

answers:

4

The thing is, i really dont want the console window to show up...but the solution should be running. My point here is, I want to keep the application running in the background, without any window coming up.

+1  A: 

Change the output type from Console Application to Windows Application. This can be done under Project -> Properties -> Application in Visual Studio:

alt text

0xA3
Console window flashes and goes back. How do i keep the application running with no window at all?
SOF User
@SOF User: How do you start the application? By double-clicking in Explorer or from the Start Menu?
0xA3
no by pressing F5 in Visual Studio
SOF User
i have also put Console.ReadLine();
SOF User
Remove the `Console.ReadLine`. It doesn't make any sense if you don't have a console window.
0xA3
+1  A: 

Change your application type to a windows application. Your code will still run, but it will have no console window, nor standard windows window unless you create one.

Sekhat
Console window flashes and goes back. How do i keep the application running with no window at all?
SOF User
You make sure it doesn't terminate. There really is not much else to say without more information. What does the program do? Does it run something in a loop?
Lasse V. Karlsen
I use timer control but its getting terminate...
SOF User
use System.Timers.Timer instead of System.Windows.Forms.Timer
Sekhat
A: 

Maybe you want to try creating a Windows Service application. It will be running in the background, without any UI.

Lee Sy En
Windows Service can not get Key pressed events
SOF User