How to hide a console of a console application from showing up while the program is still in execution
Introduction
While I was working with WCF service application, I came across a situation where I am hosting my WCF service in a console application and I don’t want the console application to show up when my service is up. I fixed it this by Pinvoke a call to FindWindow() to get a handle to your window and then call ShowWindow() to hide the window. I have created a sample code to show how I did this. It is as given below.
Here in this example, this will open up a console and it will be hidden for 10 seconds and will come up after that.
How to hide a console application If it is running from another application.
If you are running the console application from another application and you want to hide the console window, then you can do like this. This will start your console application but the window will be hidden. You can see your application still running from the task manager. If you cant find your application running in the task manager, then some error is there in your application and you may need to debug it.