noob12

In c# I can type
new FileName().ShowDialog();
and on that click/selection a new window/ form pops up.

Can anyone tell me how to do this in c++ I know that . 's are substituted with -> in c++, but this still doesn't work.

Also while we're at it, how do I link standard cpp code (old-style console ) to pop up on lets say a button within windows form designer




Re: Visual C++ Express Edition How to open new window within the original window?

TilakGopi

Hi,

It'll be like



Form2^ pFm2 =
gcnew Form2();
pFm2->ShowDialog();


Thanks,

Ch.T.Gopi Kumar.






Re: Visual C++ Express Edition How to open new window within the original window?

noob12

Still doesn't work Sad It says "undeclared identifier" @ filename.
I want to include the "about" box. I made a new form called "about" and it's a header file. When I click on the "about" in the menu I want the "about" box to pop up.




Re: Visual C++ Express Edition How to open new window within the original window?

Sheng Jiang

Then include that header file.




Re: Visual C++ Express Edition How to open new window within the original window?

noob12

Include into where I tried #include "Form2" on every single page and vc++ still doesn't recognize it.
Sorry, still no worky.. I'm basically asking how to make winforms application in vc++ express that has more than 1 window(i.e when I click a button or whatever, a new window pops up).

Can some1 start new winforms project (vc++ express), put a button on form1, then add windows form2 (design a new form), and on click of a button that new window pops up. I have looked for an hour on msdn and everywhere, can't seem to find the answer..

No matter what I do, it says either "no such file found" or "undeclared identifier"





Re: Visual C++ Express Edition How to open new window within the original window?

Sheng Jiang

Typically the header file for Form2 should be Form2.h, not Form2.