Hard OK button clicks through dialogs to form

  • Thread starter Thread starter Blair
  • Start date Start date
B

Blair

If I have a message box displayed (eg. MessageBox.Show("hello"))
And my underlying form has a KeyUp event (or GotFocus that redirects to
a control that has KeyUp event) and the user dismisses the message box
using a hard button like the OK button, or the center of the 5-way or
the return key on a hard or soft keyboard, the event is passed through
to the KeyUp event. This is obviously unintended behaviour.

I am wondering, is this a MS bug? Is there something different I should
be doing? Is there a fix or workaround?

Something else to note, if I click the OK box with the stylus, there is
no unwanted event.

Thanks,
=Blair.
 
Hi,

I think it is the normal behaviour of WM. Try to create your own
Message Box class and override the KeyUp event with the code you want.

BR


Fabien Decret
Windows Embedded Consultant

ADENEO (ADESET)
http://www.adeneo.adetelgroup.com/

Blair a écrit :
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top