bool CheckAnswer() { DialogForm dialogForm = new DialogForm(); if (dialogForm.showDialog() == System.Windows.Forms.DialogResult.OK) return true; }
The dialog form is invoked by a form created in the main form. When i close the dialog form the application is closed, not just the dialog form! If i invoke the dialog form in other form it works normally. The form from which i invoke the dialog form is top level, but even if i change that i'm getting the same result. Does anyone know what's wrong?