Results 1 to 3 of 3

Thread: Hide command prompt using C

  1. #1
    Join Date
    Jan 2009
    Posts
    65

    Hide command prompt using C

    Hello friends,


    I am a new to C.I would like to ask a question regrading the command prompt .So here we go i would like to know how to hide command prompt window while the process still running?I need to this with C programming.What i have done now is calling another program using this code (void)System("anotherprogram.exe");But unfortunately command prompt window still appear.Does any one know how to hide the command prompt window?

    thank you..

  2. #2
    Join Date
    Jan 2008
    Posts
    1,521

    Re: Hide command prompt using C

    I know to do this things by C++,but don't know how to do this with C.So in C++ You can use the functions FindWindow and ShowWindow to achieve this.For instance you can take the following tip for achieving your result:
    variable_name=FindWindow("class name", NULL);
    If the function fails the return value is NULL.
    ShowWindow(variable_name,0);

  3. #3
    Join Date
    Feb 2008
    Posts
    1,852

    Re: Hide command prompt using C

    All right once you've figured the new process you'd end the current process, and that should quit the command window.Certainly assuming that the command window only came in the first place since you ran a console program. If you invoked the program from the command-line when it was already open, I don't believe the OS is going to let you close it pro grammatically. It's going to require use of Windows libraries, since that's not the kind of thing covered by standard C. You'll obviously want to begin lower than this if you have a lot of issues understanding the examples.

Similar Threads

  1. WinRAR command prompt
    By Clayf700 in forum Windows Software
    Replies: 1
    Last Post: 11-08-2011, 12:46 PM
  2. Start avg from command prompt
    By NSA_CIA in forum Operating Systems
    Replies: 2
    Last Post: 16-06-2009, 10:20 AM
  3. Problem with command prompt
    By sams in forum Operating Systems
    Replies: 5
    Last Post: 06-03-2009, 01:30 PM
  4. about the command prompt
    By Gorganzola in forum Windows Software
    Replies: 2
    Last Post: 17-10-2008, 06:24 PM
  5. Command prompt "COPY" command not working in brand new Windows Vis
    By CMD COPY command not working in Vista in forum Vista Help
    Replies: 7
    Last Post: 06-02-2008, 02:50 AM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,713,575,675.40128 seconds with 17 queries