Subject Re: Form closing when idle
From Mustansir Ghor <mustan31@hotmail.com>
Date Mon, 21 Jun 2021 15:42:38 -0400
Newsgroups dbase.getting-started

Dear Mervyn Sir

The findinstance() works well and did the job.

But yet another issue came up. The readmodal form that was opened by menu, does not reset the time of mainform hence making it (mainform) to close even if one is working on the readmodal form.

Is there anything that can be done.

Best Regards
Mustansir


Mervyn Bick Wrote:

> On 2021/06/14 09:18, Mervyn Bick wrote:
>
> OOPS.  Mind in neutral. :-(
> >
> >   function form_canClose()
> >      local f
> >      f = findinstance("Form1Form")
> >      if not empty(f)
> >         f.close()
> >         f := findinstance("Form1Form",
> >      endif
> >
> >      f = findinstance("Form2Form")
> >      if not empty(f)
> >         f.close()
> >         f := findinstance("Form1Form",
> >      endif
> >      //repeat for all forms which may be open
> >      return true
>
>
>   function form_canClose()
>      local f
>      f = findinstance("Form1Form")
>      if not empty(f)
>         f.close()
>      endif
>
>      f = findinstance("Form2Form")
>      if not empty(f)
>         f.close()
>      endif
>      //repeat for all forms which may be open
>      return true
>
> Mervyn.