dialogresult does not work or partially work for some reason
Posted
by
ikel
on Stack Overflow
See other posts from Stack Overflow
or by ikel
Published on 2011-11-16T01:40:03Z
Indexed on
2011/11/16
1:51 UTC
Read the original article
Hit count: 100
c#
I made a form to be a dialog and the form only has one textbox, one OK button and one Cancel button. somehow, when the following does not work unless i change rnmForm.DialogResult!=DialogResult.OK), why is that????
frmRename rnmForm = new frmRename();
rnmForm.ShowDialog(new Form());
if (rnmForm.DialogResult==DialogResult.OK)
{
MessageBox.Show("test");
}
© Stack Overflow or respective owner