Answer the question
In order to leave comments, you need to log in
How to create and handle an event in Windows Forms C++?
There is a form and one button called "button1".
I want a MessageBox to pop up when pressed, how can I implement this?
Answer the question
In order to leave comments, you need to log in
automatically added to MyForm.hprivate: System::Void button1_Click(System::Object^ sender, System::EventArgs^ e) { }
What's next?
System::Windows::Forms::MessageBox::Show("FooBar");
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question