>Hi
>
>Maybe I can make some complicated workaround to get normal behavior when the keyboard is used to initiate the menu-system.
>
>I see problems in this.
>I have to detect Alt , alt + downarrow, F10 ...
>
>But, I think this must be a bug in FoxPro.
>It should not be like this, when using the mouse works as expected.
>
>Rolf
Rolf,
I'm pretty sure this is not a bug, but about understanding what's going on in there. That's exactly why I guess that my proposal about the Activate will work;
When first it would be true that the ALT+F must be "finished" on FORM_1, and it does by doing "something" after FORM_2 was activated, the very last thing it will do is give FORM_1 the focus, and thus Activate it. So trap this in the Activate-method. To me this is
not some workaround, but just normal behaviour which is not convenient. Like so many things ...
But please keep in mind : maybe I'm wrong about the proposed solution, and it doesn't work at all.
Further :
Your On Key Label should go via a general routine, in order to get more commands in there. Thus, On Key Label DO KeyTrap with cKeyCombination. In there, the ALT+F is captured (CASE ...), and you can add a lALTFPressed = .T. in there. Note that it should be in the context of the actual use (activate FORM_2 from FORM_1). De rest is easy ...
HTH