Go Back   TechArena Community > Software > Software Development
Become a Member!
Forgot your username/password?
Register Tags Active Topics RSS Search Mark Forums Read SiteMap

Tags: , ,

Sponsored Links



Hide command prompt using C

Software Development


Reply
 
Thread Tools Search this Thread
  #1  
Old 17-08-2009
Member
 
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..
Reply With Quote
  #2  
Old 17-08-2009
Modifier's Avatar
Member
 
Join Date: Jan 2008
Posts: 1,502
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);
Reply With Quote
  #3  
Old 17-08-2009
MindSpace's Avatar
Member
 
Join Date: Feb 2008
Posts: 1,832
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.
Reply With Quote
Reply

  TechArena Community > Software > Software Development


Thread Tools Search this Thread
Search this Thread:

Advanced Search


Similar Threads for: "Hide command prompt using C"
Thread Thread Starter Forum Replies Last Post
command prompt problem arshadmahmood Operating Systems 1 03-07-2010 01:33 AM
Chat with Command Prompt John mitchell Windows Software 4 02-07-2009 06:32 PM
Start avg from command prompt NSA_CIA Operating Systems 2 16-06-2009 11:20 AM
about the command prompt Gorganzola Windows Software 2 17-10-2008 07:24 PM
Command prompt "COPY" command not working in brand new Windows Vis CMD COPY command not working in Vista Vista Help 7 06-02-2008 02:50 AM


All times are GMT +5.5. The time now is 11:25 AM.