You are here:



I've written an extremely small C++ program in Borland 4.5 that I want to run constantly on my computer. The .exe comes up in a DOS window, and I was wondering if there's a bit of code I could add to make the thing run in the background (on a Windows XP machine) so that I don't have to look at it all the time. Thanks.


I think I have the answer you're looking for. Call the function ShowWindow() as follows in your program somewhere:

ShowWindow(hWnd, SW_HIDE);

If you don't have a handle to a window, use NULL in place of hWnd. It hides the window from sight.

I hope this information was helpful.



All Answers

Answers by Expert:

Ask Experts




I can answer questions about the C++ language, object oriented design and architecture. I am knowledgable in a lot of the math that goes into programming, and am certified by I also know a good deal about graphics via OpenGL, and GUIs.


I have completed numerous games and demos created with the C++ programming language. Currently employed as a software engineer in the modeling and simulation field. I have about 7 years experience.

©2016 All rights reserved.