For accessibility compliance you may also want to provide a Cancel button
that has a DialogResult property of DialogResult.Cancel, set the dialog Form's
AcceptButton to your Ok button, and the CancelButton to the cancel button.
Then you have all of your bases covered so that users can quickly navigate
and consume your dialog... (PS: Add some Alt+Key accessors to your
buttons, and if you accept user input to your Labels)...
--
Justin Rogers
DigiTec Web Consultants, LLC.
Blog:
http://weblogs.asp.net/justin_rogers
"Stoitcho Goutsev (100) [C# MVP]" <10*@100.com> wrote in message
news:O4**************@TK2MSFTNGP10.phx.gbl...
Hi
Actually, setting the DialogProperty will close the dialog. The other approach
would be to set the OK button DialogRestultProperty to DialogResult.OK. In
this case your don't have to do anything. When the user clicks on the button
the framework will set dialog's DialogResult for you thus, close the dialog.
--
HTH
Stoitcho Goutsev (100) [C# MVP]
"Nicholas Paldino [.NET/C# MVP]" <mv*@spam.guard.caspershouse.com> wrote in
message news:%2****************@TK2MSFTNGP15.phx.gbl... Daniel,
Before the dialog is closed, set the DialogResult property to
DialogResult.OK.
Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com
"Daniel" <so*******************@yahoo.com> wrote in message
news:el**************@TK2MSFTNGP15.phx.gbl... what do you have to do in a C# dialog so that it returns to ShowDialog as
DialogResult.OK ?