Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Why form is not in focus
Message
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00579708
Message ID:
00579721
Views:
29
>I have made a simple one form program. When i compile and run it as an .EXE the form will display but it is not focused as the current application. I have to click in the form with the mouse to set focus to that form before i can type into it. I have tried different things (like formname.show()) but I can't get it to focus when starting up. Funny thing is that it works fine inside VFP.
>
>Any ideas?
>
>Thanks
>
Costas,

This sounds like a familar problem with a SDI application with a top-level form. Here's the solution I came up with. Naturally, I have SCREEN=OFF in the config.fpw file. In my main prg, I have something similar to the following:
* Check to see if we're in development mode
IF VERSION(2) # 0
  * We are so hide the _SCREEN
  _SCREEN.Visible = .F.
ENDIF
*
* Initialization code
*
DO FORM MyForm.scx NAME oForm LINKED
oForm.Show()
oForm.Activate
READ EVENTS
This seems to do the trick for me.
George

Ubi caritas et amor, deus ibi est
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform