QUIET-mode to hide the black DOS-box inside a C-function ?

QUIET-mode to hide the black DOS-box inside a C-function ?

Postby ukoenig » Thu May 16, 2013 5: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 :?: ?
Last edited by ukoenig on Fri May 17, 2013 12:35 pm, edited 2 times in total.
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.
User avatar
ukoenig
 
Posts: 4043
Joined: Wed Dec 19, 2007 6:40 pm
Location: Germany

Re: QUIET-mode to hide the black DOS-box ?

Postby Richard Chidiak » Fri May 17, 2013 4: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
User avatar
Richard Chidiak
 
Posts: 946
Joined: Thu Oct 06, 2005 7:05 pm
Location: France

Re: QUIET-mode to hide the black DOS-box ?

Postby ukoenig » 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.
User avatar
ukoenig
 
Posts: 4043
Joined: Wed Dec 19, 2007 6:40 pm
Location: Germany

Re: QUIET-mode to hide the black DOS-box ?

Postby Richard Chidiak » Fri May 17, 2013 1: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
User avatar
Richard Chidiak
 
Posts: 946
Joined: Thu Oct 06, 2005 7:05 pm
Location: France

Re: QUIET-mode to hide the black DOS-box inside a C-function ?

Postby ukoenig » Fri May 17, 2013 3: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 :lol:
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.
User avatar
ukoenig
 
Posts: 4043
Joined: Wed Dec 19, 2007 6:40 pm
Location: Germany


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 95 guests