Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Modal form lost focus and die
Message
De
03/03/2003 16:24:11
 
 
À
03/03/2003 16:11:34
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00760474
Message ID:
00760527
Vues:
24
>Simple example :
>
>------------
>Create a two forms:
>
>1) Form1 with button and timer
>
>Command1.Click event :
> ThisForm.Timer1.Interval = 1000
> ThisForm.Timer1.Enabled = .T. // Start the Timer
> DO FORM Form2 // Call second form
>
>Timer1.OnTimer event :
> ThisForm.Command1.SetFocus() // Set focus back to form1
>
>2) Form2 with WindowType = 1 //Modal
>
>-------------
>
>Now Run the Form1 and press button.
>In one second - Bye-Bye, FoxPro!

I simulated that in Visual FoxPro and it works ok. How are you launching that form? Are you using DO FORM Form1? Are you also talking about an EXE or directly from the command prompt?

I would also not suggest such an approach. First of all, no matter how often you'll click on Form2, it will always lost its focus. But, if this is really what you want, then, you should get rid of the timer and put the proper code in the Form2 instead.
Michel Fournier
Level Extreme Inc.
Designer, architect, owner of the Level Extreme Platform
Subscribe to the site at https://www.levelextreme.com/Home/DataEntry?Activator=55&NoStore=303
Subscription benefits https://www.levelextreme.com/Home/ViewPage?Activator=7&ID=52
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform