Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Big problem: Form never gets focus
Message
De
15/05/1999 15:29:41
 
 
À
15/05/1999 11:51:18
Dragan Nedeljkovich (En ligne)
Now officially retired
Zrenjanin, Serbia
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Divers
Thread ID:
00219293
Message ID:
00219371
Vues:
14
>The gotFocus should fire if there's an object which is capable of receiving. Are you sure your controls are properly instantiated and enabled?

Hi, Dragan. Let me tell you what I've done since last night.

Thinking it might be a problem with one of my controls I deleted all of them except for 3 labels and the SessionEnvironment object. I stored the deleted controls (about 20 of them) on a blank form. I rebuilt and ran it again and got the exact same problem. Now these 3 labels and most of the controls have been there for months.

Then I restored Thursdays backup to a separate directory, renamed the form in question, and copied the form class (frmStatus) from the restored project to the current project. I changed the value of property StartForm in my app class and rebuilt. Hurray! It works.

So I'm a happy camper again. But I'm definitely scratching my head over what I could have done to the old form to keep it from getting focus after activate. When I have a little more time I will compare the properties on the bad form to the newly restored good form.

[BRIEF INTERMISSION]

I reread what you said above and things started to dawn.

Remembering now: Forms can't receive focus... Labels can't receive focus... If there is no control on the form which can receive focus then the GotFocus() event never happens...

One of the things I did on Friday was to change a control from enabled to not enabled. Every control on this form is read-only so I was probably thinking I should be consistent. Well that did it. There was no control left which could receive focus.

I just verified this.

I'll probably keep my restored form. There were hardly any other changes.

Peter


P.S.
I trust no bombs have fallen on your head so far. The NATO reps seem to have no shame. Everyone (me included) was outraged when 45 Kosovo civilians were found dead in a trench some months ago but NATO can kill 79 and brush it aside.
Peter Robinson ** Rodes Design ** Virginia
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform