Jump to content
Xtreme .Net Talk

Recommended Posts

Posted
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.
If it works... don't worry, I'll fix it.
  • *Experts*
Posted

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.

"Being grown up isn't half as fun as growing up

These are the best days of our lives"

-The Ataris, In This Diary

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...