create and show the dialog, then close it