Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. articles. downloads. faq. members. files. rss.
 From: David Younger
  Where is David Younger?
 Redfern
 Australia
 David Younger
 To: Koen Piller
  Where is Koen Piller?
 Santpoort-Zuid
 Netherlands
 Koen Piller
Subject: RE: Detect when form goes visible
Thread ID: 434881 Message ID: 434915 # Views: 46 # Ratings: 0
Version: Visual FoxPro 9 SP2 Category: General VFP Topics
Date: Tuesday, March 15, 2016 1:23:21 AM         
   



> > I have a form that has visible = .f.
> > In the init of controls on the form, there is a control.setfocus that makes the form visible = .t.
> > Its not a specific contro, there are a bunch of them and a bunch of forms so putting code in the setfocus is not really an option.
> > How can I catch this event (visible changes from .f. to .t.) and reset visible = .f.?
> > I tried assign method and form.gotfocus method and programaticchange method but none of these trigger.
> > Any ideas how to catch the change of form visible value and reset it to false?
> > Cheers
> >
> > David Younger
>
>
>
> David,
> Your question is not clear.
> In the 'init of controls' is this a typo or what controls are you talking? The form itselve has only one init.
> Just put Thisform.visible = .T. in the form will make it visible.
> If you have subclassed your form than if you put this in the class, all the forms derived, the whole bunch, will benifit from this one line.
> Dont think you should tamper with form.gotfocus or the programmaticchange event, which does not exists on a form (only on Check-, Combo-, Edit-, List- and TextBox and Command- and OptionGroup and Spinner)
> Can you elaborate your problem?
> Regards,
> Koen

Hi Koen,
On the form there are a bunch of controls (of course).
When the form loads, it runs the init of the controls first before it runs the init of the form.
In the init of some of the controls is the comand THIS.SetFocus (for whatever reason it is there).
When this occurs, the form becomes visible.
I want to catch this event when the form.visible becomes .t.
Cheers



David Younger

ENTIRE THREAD

Detect when form goes visible Posted by David Younger @ 3/14/2016 11:38:31 AM
RE: Detect when form goes visible Posted by Koen Piller @ 3/14/2016 4:13:03 PM
RE: Detect when form goes visible Posted by David Younger @ 3/15/2016 1:23:21 AM
RE: Detect when form goes visible Posted by Koen Piller @ 3/15/2016 7:35:33 AM
RE: Detect when form goes visible Posted by António Lopes @ 3/15/2016 9:20:14 AM
RE: Detect when form goes visible Posted by Koen Piller @ 3/15/2016 4:49:46 PM
RE: Detect when form goes visible Posted by António Lopes @ 3/15/2016 8:37:25 PM
RE: Detect when form goes visible Posted by Koen Piller @ 3/15/2016 7:35:40 AM
RE: Detect when form goes visible Posted by onytoo @ 3/18/2016 8:53:42 AM
RE: Detect when form goes visible Posted by António Lopes @ 3/18/2016 11:36:59 AM
RE: Detect when form goes visible Posted by onytoo @ 3/18/2016 2:53:53 PM
RE: Detect when form goes visible Posted by Fernando Bozzo @ 3/14/2016 4:39:57 PM
RE: Detect when form goes visible Posted by David Younger @ 3/15/2016 1:46:19 AM
RE: Detect when form goes visible Posted by Tamar Granor @ 3/14/2016 10:18:36 PM
RE: Detect when form goes visible Posted by David Younger @ 3/15/2016 1:33:21 AM
RE: Detect when form goes visible Posted by tom knauf @ 3/15/2016 4:16:12 PM
RE: Detect when form goes visible Posted by Greg Green @ 3/14/2016 10:33:09 PM
RE: Detect when form goes visible Posted by Jun Tangunan @ 3/14/2016 11:19:13 PM
RE: Detect when form goes visible Posted by Mike Yearwood @ 3/14/2016 11:46:57 PM