Fokus on C# Dialog

Hello,

I have a c# addon dialog. I like to have an event, if the dialog changes to active (dialog has blue title), or if the mouse is doing something else inside the MicroStation and the dialog changes to deactive (dialog has grey title).

The frame-class is inherited from Bentley.MicroStation.WinForms.Adapter.
But none of these events (Focus deactivate, Focus activate, Focus enter, Focus leave, Mouse enter, mouse leave) show up, if the were defined for the frame itself. The work fine on items

Any idea?

Thanks a lot

Volker

Parents
  • I haven't run across any 'good' reliable ways to detect focus in/out at the Form level within MicroStation. If you only care about mouse motion within your Form, you can rig up a timer function to test the mouse position (Control.MousePosition) against the dialog's bounds. Since WinForms doesn't have event bubbling, this problem is tricky.
  • Jeff

    I am not really interested in the mouse position; I was just looking also for the mouse as another kind of indicator for my problem.

    I have to decide, if the user is actually working with my dialog, or if he is doing some "normal" MicroStation work in the meantime.

    The workflow should/could be:

    • Calculating something with my dialog,
    • Changing something (e.g. copying, moving, whatever) in the drawing
    • Recalculating in my dialog, without closing the dialog during this workflow.
    • And so on

    I need to provide the user with different information during these steps.

    TXS Volker

    Mit freundlichen Grüßen / Best regards
    Volker Hüfner

    |  AB_DATE Engineering  Software   |  ab-date.de  |

Reply
  • Jeff

    I am not really interested in the mouse position; I was just looking also for the mouse as another kind of indicator for my problem.

    I have to decide, if the user is actually working with my dialog, or if he is doing some "normal" MicroStation work in the meantime.

    The workflow should/could be:

    • Calculating something with my dialog,
    • Changing something (e.g. copying, moving, whatever) in the drawing
    • Recalculating in my dialog, without closing the dialog during this workflow.
    • And so on

    I need to provide the user with different information during these steps.

    TXS Volker

    Mit freundlichen Grüßen / Best regards
    Volker Hüfner

    |  AB_DATE Engineering  Software   |  ab-date.de  |

Children
No Data