Phreak Posted December 10, 2002 Posted December 10, 2002 Ok, this is probably simple. But I want to be able to tell in my Main form, if the "Cancel" button on my login form is pressed. So that way, it doesn't do a bunch of junk in my main form since the user canceled the form. Quote If it works... don't worry, I'll fix it.
*Experts* Bucky Posted December 10, 2002 *Experts* Posted December 10, 2002 Set the cancel button's DialogResult property to DialogResult.Cancel. Then, when showing this form, call its ShowDialog method, which returns a DialogResult. If the DialogResult returned from ShowDialog is DialogResult.Cancel, then the user pressed Cancel. You will probably want to change the other buttons on the dialog form so their DialogResult properties act accordingly. Quote "Being grown up isn't half as fun as growing up These are the best days of our lives" -The Ataris, In This Diary
Phreak Posted December 11, 2002 Author Posted December 11, 2002 Worked exactly how I wanted! Thanks! Quote If it works... don't worry, I'll fix it.
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.