non modal window behaviour

Moderator: Rathinagiri

Post Reply
danca
Posts: 13
Joined: Wed Mar 16, 2016 7:09 pm

non modal window behaviour

Post by danca »

Hi all, I am new to the forum (and to HMG).
I am converting a program written for HWGUI. If I define a non modal window in HWGUI the execution of program goes on after the window activation, as it happens in HMG with WAIT WINDOW ... NOWAIT:
<window definition>
...
<window activation>
<other stuff>
With HMG <other stuff> is not executed until I close the window.
I have a function that processes a number of images. Actually a window is created, or not, (because the program can run in unattended mode too), containing some infos and a button "stop" and the processing continues. If the user clicks the button, a flag is set (ON CLICK {||lStopEx:=.t.}, and the function completes the current operation then exits the loop.

I am not able to figure out how to do the same with HMG. Should I use the ON INIT clause? I would have to change the program flow in that case. Before reworking it, if someone can clarify this point would be greatly appreciated!
Many thanks and good programming to all.

BTW I am using HMG (v. 3.3.1) since a couple of weeks and I find it very good.
Dan
trmpluym
Posts: 303
Joined: Tue Jul 15, 2014 6:52 pm
Location: The Netherlands

Re: non modal window behaviour

Post by trmpluym »

Yep,

ON INIT <InitProcedureName> | <bBlock> ]

Will do the job !

Enjoy HMG ...
User avatar
esgici
Posts: 4543
Joined: Wed Jul 30, 2008 9:17 pm
DBs Used: DBF
Location: iskenderun / Turkiye
Contact:

Re: non modal window behaviour

Post by esgici »

danca wrote:Hi all, I am new to the forum (and to HMG).
Hi Dan

You are welcome to wonderful word of HMG :arrow:
I am not able to figure out how to do the same with HMG. Should I use the ON INIT clause? I would have to change the program flow in that case.
In HMG, "main" loop of a program is loop of "main window".

As our friend trmpluym said, ON INIT sentence will be useful in order to solve your problem.

This topic also may be helpful to you.

Happy HMG'ing :D
Viva INTERNATIONAL HMG :D
User avatar
serge_girard
Posts: 3161
Joined: Sun Nov 25, 2012 2:44 pm
DBs Used: 1 MySQL - MariaDB
2 DBF
Location: Belgium
Contact:

Re: non modal window behaviour

Post by serge_girard »

Welcome Dan !

Serge from Belgium
There's nothing you can do that can't be done...
danca
Posts: 13
Joined: Wed Mar 16, 2016 7:09 pm

Re: non modal window behaviour

Post by danca »

Ok, thanks for the quick answer. I think I'll need some more help in the future...

Dan
Post Reply