Multiple Forms in MS VC++
-
I am creating a Windows Forms Application (.NET) and am trying to create and show my own About dialog but I can't figure this out. I have tried doing searches here and on the net but everything I am finding says to do one of two things: AboutDialog::Show(); or AboutDialog myDialog = new AboutDialog(); myDialog.Show(); Either way I do this it gives me an error of "error C2065: 'AboutDialog' : undeclared identifier" Forgive me for asking so many questions but I am still learning and this is one of the ways I find the easiest! Only problem is I am having a heck of a time figuring out how to search for stuff for C++. Thanks, Tom Sapp http://www.sappsworld.com
-
I am creating a Windows Forms Application (.NET) and am trying to create and show my own About dialog but I can't figure this out. I have tried doing searches here and on the net but everything I am finding says to do one of two things: AboutDialog::Show(); or AboutDialog myDialog = new AboutDialog(); myDialog.Show(); Either way I do this it gives me an error of "error C2065: 'AboutDialog' : undeclared identifier" Forgive me for asking so many questions but I am still learning and this is one of the ways I find the easiest! Only problem is I am having a heck of a time figuring out how to search for stuff for C++. Thanks, Tom Sapp http://www.sappsworld.com
Tom Sapp wrote:
AboutDialog::Show(); AboutDialog myDialog = new AboutDialog(); myDialog.Show();
is the name of the form you created AboutDialog? if not replace AboutDialog with the name of your form, the way that i do it is:
FormName^ myForm = gcnew FormName(); myForm->ShowDialog();
the "myForm" part can be replace with anything that you want it to be just make sure that it is the same in both lines of the code. also make sure that you include the header file of the form (#include "fileName.h") at the top of the file. i hope i worded this right, and that it helps you - Kyle -
Tom Sapp wrote:
AboutDialog::Show(); AboutDialog myDialog = new AboutDialog(); myDialog.Show();
is the name of the form you created AboutDialog? if not replace AboutDialog with the name of your form, the way that i do it is:
FormName^ myForm = gcnew FormName(); myForm->ShowDialog();
the "myForm" part can be replace with anything that you want it to be just make sure that it is the same in both lines of the code. also make sure that you include the header file of the form (#include "fileName.h") at the top of the file. i hope i worded this right, and that it helps you - KyleCool, apparently the #include "AboutDialog.h" part is what I was missing. I am used to using Delphi that automatically includes these types of things. I will try to remember that from now on! :D Thanks, Tom Sapp http://www.sappsworld.com