VS2019 VC++ Form1 Button Loads Form2

Anyone have VC++ code that shows how a Form1 button can cause Form2 to be displayed?
In Form1.h I tried
Form2^ f2 = gcnew Form2();
f2->ShowDialog();
But it generates multiple errors.
Using VS2019 Windows Forms
TIA for your attention.
srfpala
Topic archived. No new replies allowed.