G
G
German2018-07-10 23:05:16
visual studio
German, 2018-07-10 23:05:16

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

1 answer(s)
S
Stanislav Makarov, 2018-07-10
@mrjbom

automatically added to MyForm.h
private: System::Void button1_Click(System::Object^  sender, System::EventArgs^  e) {
  }

What's next?

Farther
System::Windows::Forms::MessageBox::Show("FooBar");

in the body of the method.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question