Run console silently, is there a way?

Can you use an API to hide the console window if you want to run a program in the background without the window popping up? could use some help all I found on the web was this but i don't know how to use it...

[code]
STARTUPINFO StartupInfo;
memset(&StartupInfo, 0, sizeof(StartupInfo));
StartupInfo.cb = sizeof(STARTUPINFO);
StartupInfo.dwFlags = STARTF_USESHOWWINDOW;
StartupInfo.wShowWindow = SW_HIDE;
[/code]

grateful for any help at all...

Comments

  • [b][red]This message was edited by Archer282 at 2005-7-23 11:35:18[/red][/b][hr]
    : Can you use an API to hide the console window if you want to run a program in the background without the window popping up? could use some help all I found on the web was this but i don't know how to use it...
    :
    : [code]
    : STARTUPINFO StartupInfo;
    : memset(&StartupInfo, 0, sizeof(StartupInfo));
    : StartupInfo.cb = sizeof(STARTUPINFO);
    : StartupInfo.dwFlags = STARTF_USESHOWWINDOW;
    : StartupInfo.wShowWindow = SW_HIDE;
    : [/code]
    :
    : grateful for any help at all...
    :


    if im not mistaken, that structure is used with CreateProcess()

    // hide the console
    ShowWindow( GetConsoleWindow(), SW_HIDE );

    // show the console
    ShowWindow( GetConsoleWindow(), SW_SHOW );



Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

In this Discussion