"Are You Sure?" popup
I'm creating a C# app and I'd like to create a small pop-up window that asks the user if they're sure they want to continue. Basically a small box with a "yes" and a "no" button on it. How would I do this? I'm using Visual Studio 2003.
Thanks!
# 1 Re: "Are You Sure?" popup
MessageBox.Show("are you sure?", "question", MessageBoxButtons.YesNo);
# 2 Re: "Are You Sure?" popup
Have a look here: .NET Framework Class Library: MessageBox Class ( http://msdn2.microsoft.com/en-us/library/system.windows.forms.messagebox(VS.71).aspx)
# 3 Re: "Are You Sure?" popup
That makes sense.
Although, I was hoping to be able to expand the popup so I can ask the user for some input before proceeding. It looks like the MessageBox class is only for conveying messages.
# 4 Re: "Are You Sure?" popup
That makes sense.
Although, I was hoping to be able to expand the popup so I can ask the user for some input before proceeding. It looks like the MessageBox class is only for conveying messages.If you need to expand, then the easiest way is to create your own form instead of trying to modify the MessageBox class.
Arjay at 2007-11-9 11:39:33 >

# 5 Re: "Are You Sure?" popup
you can, just create a new form that contains that functionality.
# 6 Re: "Are You Sure?" popup
Let's see...tell me if I'm think about this the right way. Would I just create a form with some basic class variables that my main program would utilize?
# 7 Re: "Are You Sure?" popup
Ok, I went ahead and created a new program. All I have is two forms, Form1 and Form2. In Form1, I've created a button. I want Form2 to open when I click this button. How would I do that?
EDIT: Nevermind, figured it out. I'm golden. Thanks for your help!