How to start HB.exe file with minimize or hidden console ?

240 views
Skip to first unread message

Michael

unread,
Sep 8, 2021, 6:00:15 AM9/8/21
to Harbour Users

Hello,

How to ?
//hb_gtInfo(HB_GTI_MINIMIZE, .T.) this command dosent work.


Best Regards Michael

KennyOoi

unread,
Sep 12, 2021, 2:03:01 AM9/12/21
to Harbour Users
hi,
this might help ,but only for windows.

#include 'hbgtinfo.ch'
*********************
#define SW_HIDE             0
#define SW_SHOWNORMAL       1
#define SW_NORMAL           1
#define SW_SHOWMINIMIZED    2
#define SW_SHOWMAXIMIZED    3
#define SW_MAXIMIZE         3
#define SW_SHOWNOACTIVATE   4
#define SW_SHOW             5
#define SW_MINIMIZE         6
#define SW_SHOWMINNOACTIVE  7
#define SW_SHOWNA           8
#define SW_RESTORE          9
#define SW_SHOWDEFAULT      10
#define SW_MAX              10

proc main()
local lnhnd
cls
lnhnd := hb_gtInfo( HB_GTI_WINHANDLE ) //wvt_getWindowHandle() // gtwvt.lib
? lnhnd
? 'MINIMIZED'
wait
ShowWindow( lnhnd ,SW_MINIMIZE )
inkey( 15 )
? hb_run( 'dir /w' )
ShowWindow( lnhnd ,SW_RESTORE )
wait
retu
*******************
#pragma BEGINDUMP

#include "windows.h"
#include "hbapi.h"

HB_FUNC( SHOWWINDOW )
{
   hb_retl( ShowWindow( (HWND) hb_parptr( 1 ), hb_parni(2) ));
}

#pragma ENDDUMP 


Michael

unread,
Sep 18, 2021, 10:09:13 AM9/18/21
to Harbour Users
Thank You , I try and I send return message for You


Best Regards ;)

Hurricane

unread,
Sep 22, 2021, 7:17:48 PM9/22/21
to Harbour Users
hi,
There are ready-made functions, see the example
"MAXIMIZE, MINIMIZE console application" in:

Antonio Cardinaux

unread,
Feb 16, 2022, 6:32:12 AM2/16/22
to Harbour Users
which library to include
WINAPI showWindow(...
When the compilation is finished, the message appears
"Function referenced, not found, but unknown"

Antonio
Sistemas
Resipol

Michael

unread,
Feb 17, 2022, 5:11:41 AM2/17/22
to Harbour Users
Hello,
This solution is working fine :)

Best Regards
Reply all
Reply to author
Forward
0 new messages