Oh I missed the part that you open a dialog not a form. Instead of opening a dialog you could create an actual form and open and detach it like this:
FormRun formRun;
Args args = new Args();
;
args.name(formstr(YOURFORMNAME));
formRun = ClassFactory.formRunClass(args);
formRun.init();
formRun.run();
formRun.detach();
this.close();