Click to See Complete Forum and Search --> : Is it possible to hide the command prompt?


delahappy
July 28th, 2005, 10:45 AM
I have this application that I wrote in C# that creates a report about issues on my network. I want this application to run all the time (it has a built in timer as to when to refresh the report) but I don't want the cmd window to be up all the time. Is there some way that I can hide that window while the program runs?

Thanks in advance for any help.

darwen
July 28th, 2005, 10:51 AM
Why don't you write yourself a service ? It's really easy with .NET : there's loads of articles out there and some pretty useful MSDN pages too.

If you've got DevStudio Professional there's a wizard to create one too.

Have a look here :

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vbcon/html/vbconintroductiontontserviceapplications.asp

Darwen.

khanafer
July 28th, 2005, 11:12 AM
I am not sure f this helps, but I usually use the following command to hide a process:


Process prc;
prc.StartInfo.WindowStyle = System.Diagnostics.ProcessWindowStyle.Hidden;

delahappy
July 28th, 2005, 12:52 PM
I am not sure f this helps, but I usually use the following command to hide a process:


Process prc;
prc.StartInfo.WindowStyle = System.Diagnostics.ProcessWindowStyle.Hidden;
What would i have to include as a "using" to use that code?

khanafer
July 28th, 2005, 01:31 PM
using System.Diagnostic;

hope it helps!

Ali

delahappy
July 28th, 2005, 03:09 PM
Thank you!