WAIT WINDOW
Moderator: Rathinagiri
WAIT WINDOW
Hi
I am trying to use WAIT WINDOW...NOWAIT command in my program but getting error msg as per enclosed ss
What am I doing wrong ? please help
Thanks
I am trying to use WAIT WINDOW...NOWAIT command in my program but getting error msg as per enclosed ss
What am I doing wrong ? please help
Thanks
- Attachments
-
- Error msg-WAIT WINDOW.png (950.33 KiB) Viewed 2596 times
Re: WAIT WINDOW
Use
Declare window _hmg_childwaitwindow
on the begin of your app
Declare window _hmg_childwaitwindow
on the begin of your app
Re: WAIT WINDOW
Hi mol
Thanks for your reply.
I tried as advised by you but it didn't work.
I am enclosing my program . Please indicate where I have to add the command you have mentioned.
- Attachments
-
- Testwait.zip
- (1.75 KiB) Downloaded 152 times
Re: WAIT WINDOW
You didn't attach TestWait.fmg file.
I'm using such a function to call wait window:
It works fine to me.
I hope it helps you
I'm using such a function to call wait window:
Code: Select all
function TurnOnWaitWindow
param cMessage
local nW
nW := 1 + round(getTextWidth(NIL,cMessage,"ARIAL")/ GetProperty("_HMG_CHILDWAITWINDOW","Message","Width"),0)
nHeight := 50+ 25*nW
//SetProperty("_HMG_CHILDWAITWINDOW","Message", "BackColor", {255,255,0} )
//SetProperty("_HMG_CHILDWAITWINDOW","Message", "AutoSize", .t. )
SetProperty("_HMG_CHILDWAITWINDOW","Height", nHeight)
SetProperty("_HMG_CHILDWAITWINDOW","Message","Height", 25 * nW)
SetProperty("_HMG_CHILDWAITWINDOW","Message","Row", nHeight - 25*(nW+1) )
SetProperty("_HMG_CHILDWAITWINDOW","Message","FONTBOLD",.t.)
Wait Window cMessage NOWAIT
return .t.
I hope it helps you
Re: WAIT WINDOW
Hi molmol wrote: ↑Sat Feb 01, 2020 8:29 pm You didn't attach TestWait.fmg file.
I'm using such a function to call wait window:It works fine to me.Code: Select all
function TurnOnWaitWindow param cMessage local nW nW := 1 + round(getTextWidth(NIL,cMessage,"ARIAL")/ GetProperty("_HMG_CHILDWAITWINDOW","Message","Width"),0) nHeight := 50+ 25*nW //SetProperty("_HMG_CHILDWAITWINDOW","Message", "BackColor", {255,255,0} ) //SetProperty("_HMG_CHILDWAITWINDOW","Message", "AutoSize", .t. ) SetProperty("_HMG_CHILDWAITWINDOW","Height", nHeight) SetProperty("_HMG_CHILDWAITWINDOW","Message","Height", 25 * nW) SetProperty("_HMG_CHILDWAITWINDOW","Message","Row", nHeight - 25*(nW+1) ) SetProperty("_HMG_CHILDWAITWINDOW","Message","FONTBOLD",.t.) Wait Window cMessage NOWAIT return .t.
I hope it helps you
Thanks for the code. Alas ! I am still getting the same error message.
I am enclosing all the files again(including fmg file).
Please correct the program.
Many thanks
- Attachments
-
- TestWait2.zip
- (2.8 KiB) Downloaded 136 times
- serge_girard
- Posts: 3364
- Joined: Sun Nov 25, 2012 2:44 pm
- DBs Used: 1 MySQL - MariaDB
2 DBF - Location: Belgium
- Contact:
Re: WAIT WINDOW
You have NOT declared _HMG_CHILDWAITWINDOW !
Serge
Serge
There's nothing you can do that can't be done...
Re: WAIT WINDOW
Hi Serge_girard
Thanks for your reply.
If you check line no 17(which is commented now) I did declare it , but since my problem still persisted I commented it.
Can you pls tell where should I DECLARE it for the program to work.
Many thanks.
Thanks for your reply.
If you check line no 17(which is commented now) I did declare it , but since my problem still persisted I commented it.
Can you pls tell where should I DECLARE it for the program to work.
Many thanks.
- serge_girard
- Posts: 3364
- Joined: Sun Nov 25, 2012 2:44 pm
- DBs Used: 1 MySQL - MariaDB
2 DBF - Location: Belgium
- Contact:
Re: WAIT WINDOW
Please, send it in a new ZIP file!
Serge
Serge
There's nothing you can do that can't be done...
- mustafa
- Posts: 1175
- Joined: Fri Mar 20, 2009 11:38 am
- DBs Used: DBF
- Location: Alicante - Spain
- Contact:
Re: WAIT WINDOW
Hello friend RPC
The file 'TestWait.Fmg'
it is giving me Error
if you move everything to 'TestWait.prg'
it's giving me OK
All the rest code is the same
Regards
Mustafa
The file 'TestWait.Fmg'
it is giving me Error
if you move everything to 'TestWait.prg'
it's giving me OK
Code: Select all
#include "hmg.ch"
FUNCTION Main()
PUBLIC lPIsNet := .f.
DEFINE WINDOW TESTWAIT ;
AT 265 , 551 ;
WIDTH 620 HEIGHT 487 ;
MAIN ;
ON INIT isInternet()
ON KEY ESCAPE ACTION TESTWAIT.Release
DEFINE BUTTON Button_1
ROW 30
COL 30
WIDTH 100
HEIGHT 28
ACTION Dnld()
CAPTION "Button_1"
FONTNAME "Arial"
FONTSIZE 9
TOOLTIP ""
FONTBOLD .F.
FONTITALIC .F.
FONTUNDERLINE .F.
FONTSTRIKEOUT .F.
ONGOTFOCUS Nil
ONLOSTFOCUS Nil
HELPID Nil
FLAT .F.
TABSTOP .T.
VISIBLE .T.
TRANSPARENT .F.
MULTILINE .F.
PICTURE Nil
PICTALIGNMENT TOP
END BUTTON
DEFINE STATUSBAR FONT "Courier New" SIZE 9
STATUSITEM "HMG Power !!!"
KEYBOARD // will show status of Caps lock,Nums lock and insert mode. it is equal to 3 items on statusbar
DATE
CLOCK
STATUSITEM "Internet OFF" ACTION isInternet()
END STATUSBAR
END WINDOW
Center Window TESTWAIT
Activate Window TESTWAIT
Return Nil
Regards
Mustafa
Re: WAIT WINDOW
Hi Mustafa
Many thanks for your reply.
Yes, you are right if everything is moved to .prg file it is working.
I wonder why.
Many thanks for your reply.
Yes, you are right if everything is moved to .prg file it is working.
I wonder why.