Ok I'm trying to make a GUI with multiple forms on Visual C++ 2005 Express Edition. And I was following a tutorial and made two forms. Form1 and Second. I want the Second form to open from Form1. So I included Second.h in form1 and then added this to the code:

private: System::Void Form1_DoubleClick(System::Object^  sender, System::EventArgs^  e) {
				 Second *dos= new Second;
				 dos->Show();
			 }

I get the following three errors:
error C3699: "*" cannot use this indirection on 'Multiforms1::Second'
error C2750: 'Multiforms1::Second': cannot use "new" on the reference type; use gcnew instead
error C2440: 'initializing: cannot convert form Multiforms1::Second* to 'Multiforms::Second^'

I tried messing around with it, but I can't get it to work.

Recommended Answers

All 4 Replies

Form2 ^form2 = gcnew Form2();
form2->Show(this);

I love you! =)

Dear natique, can u tell me where u get ur tutorial? I've been seaching this tutorial since last 2 week and dont get any of it....almost give up already....one more question, how u display Form 2 from Form 1? Using button? Hope u can explain to me if u dont mind...huhu

commented: Don't bump old threads -1

Dear natique, can u tell me where u get ur tutorial? I've been seaching this tutorial since last 2 week and dont get any of it....almost give up already....one more question, how u display Form 2 from Form 1? Using button? Hope u can explain to me if u dont mind...huhu

@slowlearner2010 you are 5 years to late, bumping old thread. If you want to get answer to your question you better to repost as this thread is now closed.

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.