public static void MainFun() { try { theRevolveTrim = new RevolveTrim(); theRevolveTrim.Show(); } catch (Exception ex) { theUI.NXMessageBox.Show("Block Styler", NXMessageBox.DialogType.Error, ex.ToString()); } finally { theRevolveTrim.Dispose(); } }