Re: HMG Program Error on MultiChild Form
Posted: Sat Jun 19, 2010 6:06 pm
I've tested before this change and I've not found problems.Czarny_Pijar wrote:Roberto Lopez wrote: Your sample is incorrect.
You must activate the three windows:There is various samples where multiple window activation is used.Code: Select all
Activate Window Main , form_child , form_child2
Please consider that if you close a window using the [X] or ALT+F4 it is RELEASED from memory, so it cannot be shown or hidden, since it does not exists anymore.
If you use the NOAUTORELEASE clause when defining a window, it will be hidden instead released when you close with [X] or ALT+F4.
All of this are explained in the samples at \samples\noautorelease.
So, the program behaves as it should.
Is important to remark that this is not a matter of styles. The above code is incorrect and could produce unexpected results.Czarny_Pijar wrote: In my demo I've activated the windows in a different style:Neither of these is perfect from the point of view of the common clipper programmer (i.e. myCode: Select all
Main.Activate form_child.Activate form_child2.Activate). The first opens 3 windows at the start of the program, and Alt-F4 quirks are only delayed.
I've introduced ACTIVATE WINDOW ALL command and NOAUTORELEASE windows clause as 'VB style' since, using it you could define all windows at startup and show or hide as needed with only one message loop (as in VB).Czarny_Pijar wrote: The easy way is here:All works as expected.Code: Select all
Load Window Main Load Window form_child Load Window form_child2 Main.Center Activate Window All
This is the help test on the samples:
* NoAutoRelease Style Demo
* Using this style speed up application execution, since the forms are
* loaded / created / activated only once (at program startup). Later you
* only must show or hide them as needed.
*
* NOAUTORELEASE window clause, makes that, when the user closes the windows
* interactively they are hide instead released from memory, then, there is
* no need to reload / redefine / activate prior show it again.
*
* NOSHOW clause makes that the windows be not displayed at activation.