Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Languages / Managed C++ / September 2004

Tip: Looking for answers? Try searching our database.

Referencing a Form(.NET)?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Lynn Morrison - 23 Sep 2004 17:46 GMT
Hi, I created a Form and need a pointer to it so that I can reuse it again
and again instead of recreating it all the time.. something like this...

Form1.h

// .... snipped for brevity

#include "Form2.h"

// class def ... snip

Form2 *Preferences;

Preferences = new Form2();
Preferences->Parent = this;
Preferences->Show();
// ERROR

There is indeed a Form2 and it is found, no errors in the including of it.
Form2 is a .NET created form using the wizard. Nothing is done to it yet, no
controls etc... but I cannot reference Form2* Preferences nor create a Form2
with that pointer.

I get an unrecognized error... not sure what this is...

This should be programming 101, but for some strange reason.
Lord2702 - 24 Sep 2004 04:57 GMT
Can you type or paste the error ?

> Hi, I created a Form and need a pointer to it so that I can reuse it again
> and again instead of recreating it all the time.. something like this...
[quoted text clipped - 22 lines]
>
> This should be programming 101, but for some strange reason.

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.