Hello! I am a newbie in C++ so do not laugh if i ask something n00bish... Ok here is my problem: I have Form1 and Form2. On Form1 there is a Button named Button1. #include "Form2" Form2->Show; -->ERROR! When i click that button i want the Form2 to show. I've tryed but i can't figure it out. PLZ HELP... P.S.- I am veary good at VB if that helps... Other functions in cpp - i'll manage. Any Tutorial or sample code will be usefull.. ------------------------------------------------ Matic Miklavčič, 15y old, From Slovenia
In Button's Click event handler you have to create an object of Form2 and then call the DoModal Function. (I am assuming you are on Windows Platform.)
Yo man! I figure it out!!!!!!!! Code: private: System::Windows::Forms::Form^ Form2; this->Form2 = (gcnew System::Windows::Forms::Form()); private: System::Void button1_Click(System::Object^ sender, System::EventArgs^ e) { this->Form2->Show(); } LOL an easy code.... Thanks for a hint! Bye. Mickey a.k.a. Matic