// The external command invokes this on the end-user's request public void ShowPlaceElementsForm() { // If we do not have a dialog yet, create and show it if (selectorForm == null || selectorForm.IsDisposed) { // A new handler to handle request posting by the dialog UserInputHandler handler = new UserInputHandler(); // External Event for the dialog to use (to post requests) ExternalEvent exEvent = ExternalEvent.Create(handler); // We give the objects to the new dialog; // The dialog becomes the owner responsible for disposing them, eventually. selectorForm = new PlaceElementsForm(exEvent); PlaceElementsForm.form = selectorForm; selectorForm.Show(); } }