Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Big problem with the F10 key in modeless forms
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Network:
Windows 2000 Server
Database:
Visual FoxPro
Divers
Thread ID:
01297399
Message ID:
01297473
Vues:
36
>>>>>>If I hit F9 then the save works.
>>>>>>If I hit F10 then the current object loses all text that has been entered.
>>>>>>If I do not map F10 to F9 then nothing happens and the text is unchanged.
>>>>>>
>>>>>>We use command buttons on all our forms. The keypreview is turned on in the forms and there is a case statement in the form keypress that looks for any hot keys used in the command buttons and if one is hit then a procedure or whatever is run from the case statement. This has worked really well for us for a number of years.
>>>>>>
>>>>>>As I said, the Only change that caused this problem is changing the form from Modal to Modeless. If I change the form back to Modal it works ok.
>>>>>>John.
>>>>>
>>>>>What do you have in the routine you use to handle F9?
>>>>
>>>>The case statement simply does thisform.cntmenu.cmdWhaterver.Click() (The cmdButton with the hot key gets fired.)
>>>>However, the text is gone before the .cmdWhaterver.Click() even happens. (I put a wait window just before it to check it.)
>>>
>>>You said that the value of the controls disappears just before you invoke .cmdWhaterver.Click() in KeyPress Event, isn't it?
>>>Is that behaviuor is the same in Development mode and when you compile it as EXE?
>>
>>I compiled it into an .EXE and it work exactly the same. We use the system menu but replace it with our own commands. This project is currently so small that I'm sure there is no command in there that would cause the problem.
>>Thanks,
>>John.
>>
>>
>>
>>>Keep in mind that if you have Modeless form ALL menus are enabled so menu ShortCut keys have precedence.
>
>F10 default behavior is to Activate Current menu no matter what PADs are defined in it.
>So Check to see if when you press F10 the menu becomes activated and the first PAD is highlighted.

Borislav,
I did and the menu was not activated, in fact it was still showing disabled as the action is in a top level form. I also tried setting the form to a normal, in-screen form and the problem remained.
Beer is proof that God loves man, and wants him to be happy. - Benjamin Franklin
John J. Henn
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform