You add :
#include "MyForm2.h"
then
CLR_Test::MyForm2^ form2;
form2 = (gcnew CLR_Test::MyForm2());
form2->Show();
(where CLR_Test is the namespace)
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Hey! I could not find how to do this any where all the results where for C#. Does any one know how to do this? Thanks for reading :)
(what I mean is open another form)
You add :
#include "MyForm2.h"
then
CLR_Test::MyForm2^ form2;
form2 = (gcnew CLR_Test::MyForm2());
form2->Show();
(where CLR_Test is the namespace)
Hi @Eman49 ,
You could add code to the button. The following code uses the button to call out a blank dialog box. You could use the same method to call out the dialog box you designed. This code is written in MyForm.h
, and the Form2
in the code is a dialog box that I customize. Hope it helps.
#include"Form2.h"
private: System::Void button1_Click(System::Object^ sender, System::EventArgs^ e) {
Form2 ^ ff=gcnew Form2();
ff->Show();
}
Best regards,
Elya
If the answer is the right solution, please click "Accept Answer" and upvote it.If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.