Dear developers!
In attached sample I try to call modal form with TDBFBrowse from another
modal form.
When I create this form just before ShowModal, it works.
But when I create this form earlier (in FormInitialize) and use it later,
this form is appeared but does not respond any key or mouse clicks.
I want to use this technique (early form creation) in my projects.
Can you look at this problem?
Thank you. Oleg.
Attached files test14.zip (4.7 KB)Â
In order for this site to work correctly we need to store a small file (called a cookie) on your computer. Most every site in the world does this, however since the 25th of May 2011, by law we have to get your permission first. Please abandon the forum if you disagree.
Para que este foro funcione correctamente es necesario guardar un pequeño fichero (llamado cookie) en su ordenador. La mayoría de los sitios de Internet lo hacen, no obstante desde el 25 de Marzo de 2011 y por ley, necesitamos de su permiso con antelación. Abandone este foro si no está conforme.
Para que este foro funcione correctamente es necesario guardar un pequeño fichero (llamado cookie) en su ordenador. La mayoría de los sitios de Internet lo hacen, no obstante desde el 25 de Marzo de 2011 y por ley, necesitamos de su permiso con antelación. Abandone este foro si no está conforme.
Problem with ShowModal
Problem with ShowModal
Oleg,
> In attached sample I try to call modal form with TDBFBrowse from another
> modal form.
> When I create this form just before ShowModal, it works.
> But when I create this form earlier (in FormInitialize) and use it later,
> this form is appeared but does not respond any key or mouse clicks.
>
> I want to use this technique (early form creation) in my projects.
>
> Can you look at this problem?
The problem is that TForm3 is created in the TForm2's OnInitialize event. At
this moment, TForm2 is not yet shown, and later, when TForm2:ShowModal() is
called, all other forms are disabled, including TForm3. The way to do that,
is to create TForm3 in the TForm2's OnShow event, when TForm2 is already
shown.
BTW, creating forms at start to use them later requires to set lHideOnClose
to .T., to avoid destroing them prematurely.
Attached is the sampled already fixed.
--
Regards,
Jose F. Gimenez
http://www.xailer.com
http://www.xailer.info
Attached files test14.zip (3.3 KB)Â
> In attached sample I try to call modal form with TDBFBrowse from another
> modal form.
> When I create this form just before ShowModal, it works.
> But when I create this form earlier (in FormInitialize) and use it later,
> this form is appeared but does not respond any key or mouse clicks.
>
> I want to use this technique (early form creation) in my projects.
>
> Can you look at this problem?
The problem is that TForm3 is created in the TForm2's OnInitialize event. At
this moment, TForm2 is not yet shown, and later, when TForm2:ShowModal() is
called, all other forms are disabled, including TForm3. The way to do that,
is to create TForm3 in the TForm2's OnShow event, when TForm2 is already
shown.
BTW, creating forms at start to use them later requires to set lHideOnClose
to .T., to avoid destroing them prematurely.
Attached is the sampled already fixed.
--
Regards,
Jose F. Gimenez
http://www.xailer.com
http://www.xailer.info
Attached files test14.zip (3.3 KB)Â
Problem with ShowModal
Oleg,
> In attached sample I try to call modal form with TDBFBrowse from another
> modal form.
> When I create this form just before ShowModal, it works.
> But when I create this form earlier (in FormInitialize) and use it later,
> this form is appeared but does not respond any key or mouse clicks.
>
> I want to use this technique (early form creation) in my projects.
>
> Can you look at this problem?
The problem is that TForm3 is created in the TForm2's OnInitialize event. At
this moment, TForm2 is not yet shown, and later, when TForm2:ShowModal() is
called, all other forms are disabled, including TForm3. The way to do that,
is to create TForm3 in the TForm2's OnShow event, when TForm2 is already
shown.
BTW, creating forms at start to use them later requires to set lHideOnClose
to .T., to avoid destroing them prematurely.
Attached is the sampled already fixed.
--
Regards,
Jose F. Gimenez
http://www.xailer.com
http://www.xailer.info
Attached files test14.zip (3.3 KB)Â
> In attached sample I try to call modal form with TDBFBrowse from another
> modal form.
> When I create this form just before ShowModal, it works.
> But when I create this form earlier (in FormInitialize) and use it later,
> this form is appeared but does not respond any key or mouse clicks.
>
> I want to use this technique (early form creation) in my projects.
>
> Can you look at this problem?
The problem is that TForm3 is created in the TForm2's OnInitialize event. At
this moment, TForm2 is not yet shown, and later, when TForm2:ShowModal() is
called, all other forms are disabled, including TForm3. The way to do that,
is to create TForm3 in the TForm2's OnShow event, when TForm2 is already
shown.
BTW, creating forms at start to use them later requires to set lHideOnClose
to .T., to avoid destroing them prematurely.
Attached is the sampled already fixed.
--
Regards,
Jose F. Gimenez
http://www.xailer.com
http://www.xailer.info
Attached files test14.zip (3.3 KB)Â
Problem with ShowModal
Jose!
> The problem is that TForm3 is created in the TForm2's OnInitialize event.
> At this moment, TForm2 is not yet shown, and later, when
> TForm2:ShowModal() is called, all other forms are disabled, including
> TForm3. The way to do that, is to create TForm3 in the TForm2's OnShow
> event, when TForm2 is already shown.
Thank you for the clue and for such fast answer.
BTW I found that I can create form in OnInitialize event if
I write ::oFrm:lEnabled:=.t. just before ::oFrm:ShowModal()
Thank you. Oleg.
> The problem is that TForm3 is created in the TForm2's OnInitialize event.
> At this moment, TForm2 is not yet shown, and later, when
> TForm2:ShowModal() is called, all other forms are disabled, including
> TForm3. The way to do that, is to create TForm3 in the TForm2's OnShow
> event, when TForm2 is already shown.
Thank you for the clue and for such fast answer.
BTW I found that I can create form in OnInitialize event if
I write ::oFrm:lEnabled:=.t. just before ::oFrm:ShowModal()
Thank you. Oleg.
Problem with ShowModal
Jose!
> The problem is that TForm3 is created in the TForm2's OnInitialize event.
> At this moment, TForm2 is not yet shown, and later, when
> TForm2:ShowModal() is called, all other forms are disabled, including
> TForm3. The way to do that, is to create TForm3 in the TForm2's OnShow
> event, when TForm2 is already shown.
Thank you for the clue and for such fast answer.
BTW I found that I can create form in OnInitialize event if
I write ::oFrm:lEnabled:=.t. just before ::oFrm:ShowModal()
Thank you. Oleg.
> The problem is that TForm3 is created in the TForm2's OnInitialize event.
> At this moment, TForm2 is not yet shown, and later, when
> TForm2:ShowModal() is called, all other forms are disabled, including
> TForm3. The way to do that, is to create TForm3 in the TForm2's OnShow
> event, when TForm2 is already shown.
Thank you for the clue and for such fast answer.
BTW I found that I can create form in OnInitialize event if
I write ::oFrm:lEnabled:=.t. just before ::oFrm:ShowModal()
Thank you. Oleg.