* "Wardeaux" <wa******@bellsouth.net> scripsit:
I have login form used with ShowDialog(). I have the AcceptButton
property set so that the "Enter" key is mapped. I also need to keep the
dialog open when the UserID and PWD are invalid so user can reenter them.
How to I prevent the form from closing?
Set the button's 'DialogResult' property to 'None', then add something
like the code below to the button's 'Click' event handler:
\\\
If IsValidPassword(...) Then
Me.DialogResult = DialogResult.OK
Me.Close()
Else
...
End If
///
--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>