Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
User clicks too fast on the toolbar
Message
 
To
24/11/1996 15:13:40
General information
Forum:
Visual FoxPro
Category:
Troubleshooting
Miscellaneous
Thread ID:
00013273
Message ID:
00013387
Views:
38
> > >I might be missing the point too, but if you suggest to duplicate the same code, > >why not create a method with that code and just call it from Activate and Load? > >Just an observation. But I think if Michel clarifies what exactly is going on, we > >might come up with a workaround at least...Come on, Mich, tell us :) I kind of > >missed the whole problem :( > > The main focus is to execute the code in the Activate() because this is the code being executed when we move from one form to another. I can't put this code elsewhere because it will not be executed as the Activate() is. > > In my app, I have multiple forms at the same time on the screen and the user can move to another one without closing it. Michel, I think Tom has a point. If I understand correctly you have some settings that have to be done at 'form creation' time _and_ at 'activation' time. The problem being that at from creation, you also 'activate' the form and that the activate event is fired too late for you purposes. These settings are thus best but in some ad hoc method and called at init time from the correct event (load, init, show, DE etc.) and by Activate if the current form is being activated (but not initiated) like for example when the user clicks on a deactivated form. You will also need a property that tells you whether or not you are initiating or activating your form. let FormInitiated be that property and MyActivation be the method, you set FormInitiated to .t. in the Init event, and in the Activate event you put if thisform.FormInitiated thisform.FormInitiated= .f. else this.Activation() endif HTH, Marc

If things have the tendency to go your way, do not worry. It won't last. Jules Renard.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform