Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Big problem: Form never gets focus
Message
De
17/05/1999 11:40:59
 
 
À
14/05/1999 23:46:23
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Divers
Thread ID:
00219293
Message ID:
00219633
Vues:
15
>Hello. I have a little form (FrmStatusBar) which sits at the top of my main screen and contains a lot of status information. It's the first thing that get instantiatied after the application. It's worked fine for months.
>
>Suddenly the form stopped appearing. (I was making some minor changes to the form.) When I trace the execution, Activate is called but the GotFocus() method never gets called.
>
>I reloaded a version from Tuesday and the event order is what I would expect: Show, Activate, RefreshForm (a codebook method), GotFocus (contents of form appear), back to DoForm().
>
>The order on my current (failing) form is: Show, Activate, RefreshForm, back to DoForm().
>
>If I execute the GotFocus() method from the command line, the form appears and looks normal.
>
>As I understand it, the jump from Activate to GotFocus is native behavior of the Form baseclass.
>
>Anyone have a guess as to what would disrupt this? I've deleted some of the controls I was working on but it's still failing.
>
>Peter Robinson

Peter,

This is not a good solution, it is time consuming and a bloody nuisance, but it does work. In the GotFocus() event, add one or more wait windows to tell you what is going on at the moment. You will end up adding and removing them in several places until you narrow in on the problems.

What I can tell you is that you are getting bitten by the Windows event model. Because in this case the order things are happening in is out of your control. Another thought just occurred to me. Execute a rebuild of your project. Don't worry about apps or exes, just rebuild the project with the recompile all files switch set to true.

My partner and I just spent the better part of half a day tracking down what was a huge problem for our client, and in the end ended up moving a single line of code from one place to another.

Regards,

Jason
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