Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Windowstate not working
Message
De
19/01/2017 18:19:26
 
 
À
12/01/2017 18:12:14
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
01646560
Message ID:
01646879
Vues:
141
>I tested the problem you pointed with setfocus...
>
>1.in form.init if you write:
>
>thisform.text1.setfocus && Assigns the focus to a control.
>thisform.windowstate=2  && or set at design time
>
>this works as well
>
>2.but if you inverse
>
>thisform.windowstate=2 && or set at design time
>thisform.text1.setfocus
>
>the form dont maximize and set the focus to the control !
>
>3.better way is to set your focus in form.activate event.that works.
>
>form.init
>thisform.windowstate=2 && or set at design time
>
>form.activate
>thisform.text1.setfocus
>
I'd prefer using the Show() method instead of the Activate() method, with the latter, when you change to another form and then return to the form in question the textbox would receive focus, which could be undesirable.

In general, I prefer not to put code that has to do with the user interface in the Init() method.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform