>I tested the problem you pointed with setfocus...
>
>1.in form.init if you write:
>
>thisform.text1.setfocus
>thisform.windowstate=2
>
>this works as well
>
>2.but if you inverse
>
>thisform.windowstate=2
>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
>
>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.