FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour QUIET-mode to hide the black DOS-box inside a C-function ?
Posts: 4043
Joined: Wed Dec 19, 2007 06:40 PM
QUIET-mode to hide the black DOS-box inside a C-function ?
Posted: Thu May 16, 2013 05:39 PM

Hello,

running something on DOS-level, a short time the black DOS-box is visible.
I remember, there was a QUITEmode posiible ( without the black box )

Regards
Uwe :?: ?

Since 1995 ( the first release of FW 1.9 )

i work with FW.

If you have any questions about special functions, maybe i can help.
Posts: 946
Joined: Thu Oct 06, 2005 07:05 PM
Re: QUIET-mode to hide the black DOS-box ?
Posted: Fri May 17, 2013 04:50 AM

Uwe

you can use shellexecute to execute the "dos command or exe " needed

ShellExecute( 0, cOperation, cPathFilename, cParameters, cDirectory, nShowCommand ) nshowcommand = 0 // SW_HIDE EQUATE(0)

Hth

Richard

http://www.cbati.com

Uestudio
Fwh 13.05 Harbour 3.2 MSVC 2013
Posts: 4043
Joined: Wed Dec 19, 2007 06:40 PM
Re: QUIET-mode to hide the black DOS-box ?
Posted: Fri May 17, 2013 12:18 PM
Richard,

Thank You for the Info.
This is the C-function from Daniel, I'm using.
A the black DOS-box is visible during execution-
Maybe a change using ShellExecute is possible, to hide the DOS-window ?-

#include <windows.h>
// restart.c
// progname
// windows handle to close
// WinExec( argv[ 1 ], 1 );

int main(int argc, char** argv)
{
HWND handle = ( HWND ) atol( argv[ 2 ] );
PostMessage( handle, WM_QUIT, 0, 0 );
WinExec( argv[ 1 ], 1 );
return EXIT_SUCCESS;
}


Best Regards
Uwe :-)
Since 1995 ( the first release of FW 1.9 )

i work with FW.

If you have any questions about special functions, maybe i can help.
Posts: 946
Joined: Thu Oct 06, 2005 07:05 PM
Re: QUIET-mode to hide the black DOS-box ?
Posted: Fri May 17, 2013 01:26 PM

Uwe

WinExec( argv[ 1 ], 0 );

should do the trick also

Hth

Richard

http://www.cbati.com

Uestudio
Fwh 13.05 Harbour 3.2 MSVC 2013
Posts: 4043
Joined: Wed Dec 19, 2007 06:40 PM
Re: QUIET-mode to hide the black DOS-box inside a C-function ?
Posted: Fri May 17, 2013 03:16 PM
Richard,

Yes adding 0, it is working now.
Changing the C-function, there was no difference.
I only added 0 inside the button-action.
There is a short flickering, but NO visible DOS-box anymore.

The function-call :

ACTION ( cScreen := "BH", ;
SAVE_INI(), oWnd:End(), ;
WINEXEC( "RESTART IMG.exe " + Str( oWnd:hWnd ) , 0 ) ) ;

Regards
Uwe :-)
Since 1995 ( the first release of FW 1.9 )

i work with FW.

If you have any questions about special functions, maybe i can help.

Continue the discussion