Windows Forms
-
If I want to appeal a windows form, from another form when I push a button, what I should do? I tried this code and I have the following error: Error error C2061: syntax error : identifier 'Results' private: System::Void ResultsButton_Click(System::Object^ sender, System::EventArgs^ e) { Application::Run(gcnew Results()); }
-
If I want to appeal a windows form, from another form when I push a button, what I should do? I tried this code and I have the following error: Error error C2061: syntax error : identifier 'Results' private: System::Void ResultsButton_Click(System::Object^ sender, System::EventArgs^ e) { Application::Run(gcnew Results()); }
Hi Anka, Try creating an instance of the form you want to display in the button click event, and then call the form object's Show() or ShowDialog() method. Example: private Void ResultsButton_Click(System::Object^ sender, System EventArgs e) { System.Windows.Forms.Form frm = New System.Windows.Forms.Form (); frm.ShowDialog(this); } hope this works. I'm an amateur in programming myself!