The OnMouseUp event is only fired when you click somehere on the map. If you click on your dialog, or anywhere outside the map, the event won't fire.
If you're clicking on the map, and try to fire an event on a (non modal) dialog, then you can follow SeaJunk's idea.
On your tool, Implement an interface with a function that allows you to pass a reference to your form, then, on your onMouseUp event, y can call some function to your form
void SetFormToBeNotified(Form form);
class YourTool : BaseTool , IFormNotifier
Form _formToBeNotified = null;
... your code ...
void SetFormToBeNotified(Form form)
_formToBeNotified = form;
public void OnMouseUp (
//Call a function on your form
if(_formToBeNotified != null)
To access the IFormNotifier from the ICommandItem you found with the ICommandBars.find method, you should cast the ICommandItem.Command property as an IFormNotifier.
ICommandItem itemFound = commandBar.find(....);
if(itemFound != null)
IFormNotifier formNotifier = itemFound.Command as IFormNotifier;
//set the form
if(formNotifier != null)
That way, your non modal dialog will get notifications the next time you click on the map. It's important that when you close your dialog, set the form to be notified to null, to avoid accessing a deleted form.