Hi keke wang,
I guess you are creating a CLR project, you need to create two winforms, and include the header files of the subwindows in the main window code, you can refer to the following code:
#include"MyForm1.h"
MyForm1 ^ dlg = gcnew MyForm1();
dlg->Show();
In this example I am using a button to trigger the event.
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.