CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 6 of 6
  1. #1
    Join Date
    Jul 2005
    Posts
    8

    Is it possible to hide the command prompt?

    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.

  2. #2
    Join Date
    Jan 2002
    Location
    Scaro, UK
    Posts
    5,940

    Re: Is it possible to hide the command prompt?

    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/de...plications.asp

    Darwen.
    www.pinvoker.com - PInvoker - the .NET PInvoke Interface Exporter for C++ Dlls.

  3. #3
    Join Date
    Jun 2005
    Location
    Ottawa, Ontario, Canada
    Posts
    82

    Re: Is it possible to hide the command prompt?

    I am not sure f this helps, but I usually use the following command to hide a process:

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

  4. #4
    Join Date
    Jul 2005
    Posts
    8

    Re: Is it possible to hide the command prompt?

    Quote Originally Posted by khanafer
    I am not sure f this helps, but I usually use the following command to hide a process:

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

  5. #5
    Join Date
    Jun 2005
    Location
    Ottawa, Ontario, Canada
    Posts
    82

    Re: Is it possible to hide the command prompt?

    using System.Diagnostic;

    hope it helps!

    Ali

  6. #6
    Join Date
    Jul 2005
    Posts
    8

    Re: Is it possible to hide the command prompt?

    Thank you!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured