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
725
UltraToolBar and Focus issues
posted

This behavior might be "By Design" and if it is I am hoping there's a (an easy) way around it.

Background:

I have a form that is being used as a custom Find / Replace dialog. As such I am showing the form as non-modal with the topmost property set to true and using the Form.Activated (and possibly the Form.Deactivate) event(s) to make changes to the search area (as the user may have changed their selection(s) while off the Find/Replace dialog form).

Problem:

The Form.Deactivate event of the Dialog Form never fires if the user clicks on the UltraToolBar on my form. They can click anywhere else on the Main (parent) form or in/on any of the nested user controls (which is where my ToolBar actually resides) and the events fire. It is only when they click on the toolbar that the dialog form never deactivates.

I have created a test/sample app that reproduces this and attached it.

Form1 simulates the Main Form with the ToolBar and Form2 simulates the dialog. Again if you click anywhere on Form1, Form2 deactivates except if you click on the toolbar.

Thanks in advance for any assistance you can provide.

Steve

ToolbarFocusTestApp.zip
Parents
  • 28925
    Offline posted

    Hello Steve,

    If you wish to show the second form as a dialog I recommend calling ShowDialog instead of Show and/or passing the main form as an Owner.

    Change _newfrm.Show(Me) 

    to _newfrm.ShowDialog()

    Let me know if you have any questions regarding this matter.

Reply Children