>Dear Sir,
>
>I am using VFP6. I have a two forms named Form1 and Form2.
>Form1 has a timer and two commandbuttons for following purpose
>
>command1=to close form1 && taborder 1
>command2=to open form2 && taborder 2
>
>form1.timer1 has following codes
>
>
>FOR X= 1 TO _SCREEN.FORMCOUNT
>ENDFOR
>
>IF (X=1)
>thisform.visible=.t.
>ENDIF
>
>IF (X>1)
>thisform.visible=.f.
>ENDIF
>
>
>form1.Command2 has following codes
>
>do form form2
>
>
>When I close form2 the cursor goes to form1.command1.
>I want the cursor must go to form1.command2.
>I do not want to use set focus and also do not want to change tab order.
>
>Should I use "save screen to" if yes then how or if there is any other method to get the curosor's last position on form1 after closing form2.
>
>Please help me
Better to pass the form as an object property to the other form and let the second form handle the "un-hiding" of the first form. The focus should remain on the control, in your case a button, that activated the other form.