PROKA Posted October 22, 2004 Posted October 22, 2004 Ok so I have a form with a Button on it. ( let's call it button1 ) When the user clicks it , I want to check a condition : a = true ? > then cancel the click Else > Continue as if there was no condition it was something like e.handled = false but I forgot and I don't seem to remember exactly Quote Development & Research Department @ Elven Soft
PROKA Posted October 22, 2004 Author Posted October 22, 2004 Theoretically I could easily use an "Exit Sub" statement, but the problem is that this button has the property "DialogResult = OK" so if I click it, it closes my form. Quote Development & Research Department @ Elven Soft
PROKA Posted October 24, 2004 Author Posted October 24, 2004 e.Handled = True It was the command to block a keystroke ... How about the click of an button with DialogResult = OK . Does any1 know ? :( Quote Development & Research Department @ Elven Soft
Administrators PlausiblyDamp Posted October 24, 2004 Administrators Posted October 24, 2004 If you do not want the button to close the form then do not assign a dialog result to it. Quote Posting Guidelines FAQ Post Formatting Intellectuals solve problems; geniuses prevent them. -- Albert Einstein
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.