Hi All,

I have a form that contains many controls, including a custom control.
That custom control contains a number of child controls, including a
button with the text "&Search".

When the custom control or one of its child controls has focus, pressing
Alt-S causes the button to be clicked.

When one of the other controls on the form has focus, pressing Alt-S
does not cause the "&Search" button to be clicked.

Is this a WinForms issue, or am I misunderstanding something?

Yours,
Duncan Bayne

Re: Keyboard shortcuts by Sijin

Sijin
Mon Nov 08 23:48:16 CST 2004

That is the behaviour by design. The workaround would be to pass the key
event to the custom control as well.

Sijin Joseph
http://www.indiangeek.net
http://weblogs.asp.net/sjoseph

Duncan Bayne wrote:
> Hi All,
>
> I have a form that contains many controls, including a custom control.
> That custom control contains a number of child controls, including a
> button with the text "&Search".
>
> When the custom control or one of its child controls has focus, pressing
> Alt-S causes the button to be clicked.
>
> When one of the other controls on the form has focus, pressing Alt-S
> does not cause the "&Search" button to be clicked.
>
> Is this a WinForms issue, or am I misunderstanding something?
>
> Yours,
> Duncan Bayne
>