Lanc1988 Posted August 6, 2004 Posted August 6, 2004 How do I make a prompt come up that asks the user "Are you sure you want to do this?" and they have the choices Yes or No and if they click Yes it does certain events or if they click No it does certain events. Thanks in advance Quote
*Experts* mutant Posted August 6, 2004 *Experts* Posted August 6, 2004 Look into the MessageBox class, and its Show() method. This method will return the button that the user as clicked as the member of DialogResult enumeration. if(MessageBox.Show("Text", "Caption", MessageBoxButtons.YesNo) == DialogResult.Yes) //the user clicked Yes. Quote
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.