Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

traxxas25

showing form 2

This topic is 5396 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

hey guys!, im alittle confused with how to show a new form i have in my project (called form2.h) the code would go here: private: System::Void button10_Click(System::Object * sender, System::EventArgs * e) { //code goes here } all help would be appreciated, thanks for all your help guys! btw im using Visual C++ .NET 2003

Share this post


Link to post
Share on other sites
Advertisement
Guest Anonymous Poster
please guys i really need some help on thio, all help is appreciated, thanks!

Share this post


Link to post
Share on other sites
I take it you got a managed c++ winforms project. To show a form under .net managed code, there is a .Show() or .ShowModal() method that will present the form. Modal meaning it''s above all other froms, Show just meaning the other windows can come into focus as well.. You may have to create an instance of form2..

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
hmmm possibal i can get a sample code, im having trouble implementing it into my own project

Share this post


Link to post
Share on other sites
I start to suspect that it''s a homework a question...

deepdene has provided enough information for you to start with.

So let me rephrase it:
1. Create an instance of form 2.
2. .Show()

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
yeah but i may sound like a complete moron what exactly is an instance?

Share this post


Link to post
Share on other sites
quote:
Original post by Anonymous Poster
yeah but i may sound like a complete moron what exactly is an instance?


A manifestation of a class. Once you have defined a class prototype, you can (usually) create some instances of that class.

A form is a type of class; the main form that gets shown is an instance of a main form prototype... get the drift?

Kind rgds,
-Nik

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
lol not really no? can i get a sample of an instance? not the form in particualr but just a sample

Share this post


Link to post
Share on other sites
In the default application, an instance of the form1 is created:

new Form1()

On the same line, it is used as a parameter to the Application.Run function, but you could call it's methods by storing the Form1 instance as it's own variable.
For example:

Form1 *pForm = new Form1();
pForm->Show();

Now, nothing stops you from creating an instance of a Form2 class?

This is very basic OOP, i suggest you read about basic programming some more. No offense, we've all been newbies

Kind rgds,
-Nik

[edited by - Nik02 on December 14, 2003 6:14:14 AM]

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
yes but form2 isnt going to be made manualy its premade as a header file (form2.h) it was made like designing a form in VB

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!