Blog Home  Home Feed your aggregator (RSS 2.0)  
kevin Mocha
Bookmarks collected from web.
 
 Wednesday, August 11, 2010
 Monday, August 02, 2010
 Friday, July 30, 2010
 Monday, July 19, 2010
 Friday, July 02, 2010
 Monday, June 28, 2010

dropdownstyle: dropdownlist
autocompletemode: append
autocompletesource: listtiems

Monday, June 28, 2010 6:09:25 PM UTC  #    Comments [0]    |  Trackback
 Tuesday, June 22, 2010
 Friday, June 18, 2010

http://www.vbinfozine.com/t_wfdlg.shtml

But what if I want to do some validation WITHIN the button's Click event handler and if the validation fails, I DON'T WANT to close the dialog?

 

First solution: Set OKCmd.DialogResult = DialogResult.None (string "None" in the designer) and close the form manually:

 

Second solution: Leave the OKCmd.DialogResult = DialogResult.OK, but prevent the form to automatically close when the user enters invalid logon information. Here is how:

Friday, June 18, 2010 8:09:52 PM UTC  #    Comments [0]    |  Trackback
Copyright © 2010 Kevin Mocha. All rights reserved.
DasBlog 'Portal' theme by Johnny Hughes.
Pick a theme: