Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Top level form does not get the focus
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00627628
Message ID:
00628056
Vues:
29
>>>Are You sure?
>>>
>>>Define two top lewel forms ( form_a and form_b )
>>>Each form with a menu.
>>>
>>>In form_a write some menu code.
>>>Something like this.
>>>
>>>define bar 2 of popup poppp prompt "Start form_b"
>>>on selection bar 2 of popup poppp do form form_b
>>>
>>>If You initiate the menu with the mouse, everything works as expected. Form_b wil start and get focus.
>>>If You initiate the menu with your keyboard, (pressing alt and so on ) You will see the difference. Form_b will start and get focus, but only for a short moment. Then form_a will regain focus. This is not as expected and it happpens only when You initiate the menu with the keyboard.
>>>
>>>I see this behavior both in VFP 6.0 and VFP 7.0 using top level forms. My operating system is Windows 2000 (norwegian)
>>>
>>Rolf,
>>
>>I don't think I've ever used a menu in an SDI app. Most of my SDI apps, would be modal dialogs if run under a complete application, and would therefore use the VFP main screen.
>
>George,
>
>Yes, I think there are variations and many of them have the problem.
>
>I have a case where a login screen appears just fine (modal, screen=off, top-level), with focus and all. The next screen is the real application, running with screen=off and top-level and non-modal and it will ONLY get focus if the desktop is absolutely clear of any other 'active' application.
>If, for instance, I have Explorer (for file) up (which I always run with) then the app. will NEVER start with focus there.
>And this app is really only the menu (nothing else on the form) to let the user start various screens, as they may need them.

One thing that I didn't mention was that after I issued the Form's Show command, I then call it's Activate even implicitly. In trying to duplicate the problem earlier, I took away the check to see if it was run-time or design time without a change in the behavior. IOW, it wasn't the reference, apparently, to the SCREEN object that was the real culprit (though it may have been involved in the problem). Simply calling the Activate event of the form, prior to issuing READ EVENTS may have done the trick. Didn't test this, however, either with or without a menu on the SDI form.
George

Ubi caritas et amor, deus ibi est
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform