Board index » delphi » Toggling between forms with the Alt Key

Toggling between forms with the Alt Key

Is this supposed to happen?

Here is the situation...

Create a new application and two forms in delphi....Add a button to the
first form that creates and shows the second form non-modally...Now, run the
application.  Press the button on the first form to bring up the
second...Finally proceed to toggle the alt key.  The focus toggles from one
screen to the other.

Ok, please forgive me for this, but I recreated the above example in Visual
Basic...When the application is run the alt key does not toggle between the
two forms.

Any insight is greatly appreciated.

Thanks!
Jeff

 

Re:Toggling between forms with the Alt Key


Wierd!  If you put a "main menu" on one of the forms and click on that form
to set its focus, alt is processed by the menu and that doesn't happen.  If
you're on the other form, Alt will still switch back and forth...

I traced the code into the VCL and it seems to be doing things right.
Setting Form2's parent to nil instead of Form1 doesn't cure the problem.

The VCL doesn't switch the window focus, so it must be something with
Windows.

WinSight shows this...

WM_SYSKEYDOWN (Alt down)
WM_USER+0xB904 (What is this!?)
WM_SYSKEYUP (Alt up)
WM_USER_0xB905 (And this!?)
WM_KILLFOCUS (Sent to Window 0000000 - huh!?)

What's going on here?

Eric

Quote
"Jeff Cope" <JeffC...@lllow.com> wrote in message news:3bcdcb0e_1@dnews...
> Is this supposed to happen?

> Here is the situation...

> Create a new application and two forms in delphi....Add a button to the
> first form that creates and shows the second form non-modally...Now, run
the
> application.  Press the button on the first form to bring up the
> second...Finally proceed to toggle the alt key.  The focus toggles from
one
> screen to the other.

> Ok, please forgive me for this, but I recreated the above example in
Visual
> Basic...When the application is run the alt key does not toggle between
the
> two forms.

> Any insight is greatly appreciated.

> Thanks!
> Jeff

Other Threads