I have a dialog that I show with .ShowDialog(). It has an OK button and a Cancel button; the OK button also has an event handler.
.ShowDialog()
I want to
Just add one line in the event function
private: System::Void button1_Click(System::Object^ sender, System::EventArgs^ e) { this->DialogResult = System::Windows::Forms::DialogResult::None; }