Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
I hate activate
Message
De
05/02/1999 18:08:24
 
 
À
05/02/1999 16:44:21
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Titre:
Divers
Thread ID:
00183195
Message ID:
00184574
Vues:
23
>Jason, although Ken found a solution, would you tell us yours please? Thanks. There is a lot of response on activation grief.
>
>============
>Ken,
>
>What code in your activate event do you not want to fire ??? I've got what may be a suggestion, but I want to be sure I understand what you're doing before I say what it is.
>
>"Better to be silent and thought a fool, than to speak and prove it"
>
>Regards,
>
>Jason


Sure Larry, I'll be happy to.

The first thing to keep in mind is that when a form instantiates, it does so from the inside out. All of the objects on the form are created first. The next thing to keep in mind is that there are three seperate events that fire when a form is first created. Init, Load, and Activate. When you give focus back to a form, only the activate fires, the init and load do not. If there is code in your activate event that you don't want to fire when focus is returned to the form, move the code to the init or the load.

If on the other hand you want to fire the code when you want, add a method to the form, and fire it programmatically. The idea is that you take control of when the code fires. I don't use the activate method, but that's just the way I do it.

Regards,

Jason

P.S. There's also the Show method

P.P.S If you want to find out the order that things are firing, drop wait window's into the code and just run the form. Watch the order that the waits appear. There is also a utility that displays the firing sequence, but it may provide more information than you want ...
Jason Tryon
Senior Systems Analyst / Technical Lead
eBusiness / iPage
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform