Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Why form is not in focus
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00579708
Message ID:
00579721
Vues:
27
>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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform