Page 1 of 1
Wait Window & MsgInfo()
Posted: Fri Jul 03, 2020 12:37 pm
by karweru
Hello friends,
I have a queer need,...is there anyway i can force msgInfo() to close a waitWindow()?
Re: Wait Window & MsgInfo()
Posted: Fri Jul 03, 2020 1:49 pm
by edk
To be honest I don't understand what the problem is.
If you want to close WAIT WINDOW before MsgInfo() appears:
Code: Select all
(...)
WaitWindow()
MsgInfo ("Some info")
(...)
and if you want to close after confirming MsgInfo():
Code: Select all
(...)
MsgInfo ("Some info")
WaitWindow()
(...)
Re: Wait Window & MsgInfo()
Posted: Sun Jul 05, 2020 9:56 am
by karweru
edk wrote: ↑Fri Jul 03, 2020 1:49 pm
To be honest I don't understand what the problem is.
If you want to close WAIT WINDOW before MsgInfo() appears:
Code: Select all
(...)
WaitWindow()
MsgInfo ("Some info")
(...)
and if you want to close after confirming MsgInfo():
Code: Select all
(...)
MsgInfo ("Some info")
WaitWindow()
(...)
Thanks Edk,
I'm actually looking for a way to AUTOMATICALLY hide/close the WaitWindow() if a program issues a msginfo(). I have a lot of code as follows;
...
WaitWindow("processing.....")
if error()
msgInfo(<errorMsg>")
return .f.
endif
.....
Of course i can issue a waitWindow() after the msgInfo(),...was just wondering if msgInfo() could automatically issue the waitWindow()....more of being lazy

Re: Wait Window & MsgInfo()
Posted: Sun Jul 05, 2020 12:23 pm
by mustafa
Hi karweru
Could inkey () work?
Code: Select all
#include "hmg.ch"
FUNCTION MAIN
DEFINE WINDOW MAINx AT 0, 0 WIDTH 800 HEIGHT 600 TITLE ""ICON '' Main NOSIZE NOMINIMIZE NOMAXIMIZE ON INIT Export()
ON KEY ESCAPE ACTION Mainx.Release
DEFINE BUTTON Button_1
ROW 440
COL 370
WIDTH 110
HEIGHT 040
ACTION Export()
CAPTION "Wait"
FONTNAME "Arial"
FONTSIZE 9
TOOLTIP ""
FONTBOLD .T.
FONTITALIC .F.
END BUTTON
END WINDOW
Mainx.Center
Mainx.Activate
Return
*-------------------------------------*
Function Export()
*-------------------------------------*
SetProperty("_HMG_CHILDWAITWINDOW","Width ", 450)
SetProperty("_HMG_CHILDWAITWINDOW","Height", 130)
SetProperty("_HMG_CHILDWAITWINDOW","Message","Width" ,450)
SetProperty("_HMG_CHILDWAITWINDOW","Message","Height",130 )
SetProperty("_HMG_CHILDWAITWINDOW","Message","Row",2)
SetProperty("_HMG_CHILDWAITWINDOW","Message","COL",2)
SetProperty("_HMG_CHILDWAITWINDOW","Message","FontColor", {128,000,000})
SetProperty("_HMG_CHILDWAITWINDOW","Message","BACKCOLOR", {198,245,183})
SetProperty("_HMG_CHILDWAITWINDOW","Message","FONTNAME" ,"Times New Roman") // <--- "Arial"
SetProperty("_HMG_CHILDWAITWINDOW","Message","FONTSIZE" , 16 )
SetProperty("_HMG_CHILDWAITWINDOW","Message","FONTBOLD" ,.T.)
SetProperty("_HMG_CHILDWAITWINDOW","Message","FONTITALIC",.T.)
wait window CRLF +'Processing Table - »' + CRLF+ 'stock.db3' nowait
inkey(3)
wait clear
Return Nil
Regards
Mustafa