Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Windowstate not working
Message
From
19/01/2017 18:19:26
 
 
To
12/01/2017 18:12:14
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
01646560
Message ID:
01646879
Views:
140
>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.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform