H
Henrik Jernevad
Hi,
I've got a search form with the search button used as AcceptButton for
the form and everything works as expected. However, I want to be able
to capture not only Return, but also Shift+Return in which case I want
to change some settings and then perform the search as normal.
As I understand it, when an AcceptButton is used the form's KeyDown
event handler doesn't receive the Return key event even with
KeyPreview on. If I remove the AcceptButton the Return key event gets
through as expected. Is there a good way to find out whether Shift is
currently pressed form within the accept button's Click event handler?
Is there a way to display the search button with "AcceptButton style"
without it actually being accept button?
Any thoughts would be appreciated!
Regards
Henrik Jernevad
I've got a search form with the search button used as AcceptButton for
the form and everything works as expected. However, I want to be able
to capture not only Return, but also Shift+Return in which case I want
to change some settings and then perform the search as normal.
As I understand it, when an AcceptButton is used the form's KeyDown
event handler doesn't receive the Return key event even with
KeyPreview on. If I remove the AcceptButton the Return key event gets
through as expected. Is there a good way to find out whether Shift is
currently pressed form within the accept button's Click event handler?
Is there a way to display the search button with "AcceptButton style"
without it actually being accept button?
Any thoughts would be appreciated!
Regards
Henrik Jernevad