Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
80
Custom message box focus problem related to combo
posted

I am implementing a custom message box as a modal windows form.  When I call my static Show method from within the ValueChanged event of an UltraCombo (Infragistics v7.1), the message box is displayed and the Enter/Esc keys do trigger the Accept/Cancel button Click events.

However, the dropdown of the combo is still visible on the owner form and the first time I click a button on the message box the Click event does NOT fire, but, the dropdown closes up.  A subsequent click does trigger the event.

If I select a value in the combo using the arrow keys, so that the dropdown is not shown, this problem does not occur. Also, I tried setting the focus and the Capture property in the OnActivate and OnShown methods and this does highlight the button, but, the first mouse click still seems to be linked to the combo.

Any suggestions on how I can fix this would be appreciated.