i hav 2 forms Form1 n Form2 in visual studio c++ 2005.i called form2 from the form1 thru a button which is in form1. Using the following code form2 opens but form1 is still visible behind form2.

Form2().ShowDialog();
Form2().Activate();
Form1().Close();

i want only form2 to be visible .how can i hide form1 when form2 is active?pls help..

take it to the C++ forum. they'll help you.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.