We're a community of 1076K IT Pros here for help, advice, solutions, professional growth and fun. Join us!
1,075,590 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Start New Discussion Reply to this Discussion

how to code from on page to another page using button in C++

hi fellas, here is my prob:

im using microsoft visual C++ 2010 Express edition, which is a trial one...i've been googling this tutorial since last 3 week. But no result i found. I hope somebody can help me.....for ur info, im a beginner in programming world...huhu any good advise...??:)

4
Contributors
8
Replies
1 Day
Discussion Span
3 Years Ago
Last Updated
9
Views
Question
Answered
slowlearner2010
Newbie Poster
10 posts since May 2010
Reputation Points: 9
Solved Threads: 0
Skill Endorsements: 0

could you please explain exactly what you mean.

NathanOliver
Posting Virtuoso
1,513 posts since Apr 2009
Reputation Points: 269
Solved Threads: 277
Skill Endorsements: 3

>>visual C++ 2010 Express edition, which is a trial one
No it isn't. Its free to use for as long as you want and you can use it for both commercial and non-commercial purposes. There's nothing trial about it, at least not in the sense that the trial period expires.

What exactuly to you mean "from one page to another page" ? Do you have a Forms application that contains a button? Your question is very ambiguous.

Ancient Dragon
Achieved Level 70
Team Colleague
32,104 posts since Aug 2005
Reputation Points: 5,836
Solved Threads: 2,575
Skill Endorsements: 68

thank nathan...

Actually, i want to display Form 2 from Form 1 using button....i tried many code but nothing happened to my button. Here is my code that i put in Form 1:

private: System::Void button1_Click(System::Object^  sender, System::EventArgs^  e) {

      pg1 ^page 1 = gcnew pg 1();
      page 1->Show(this);

    }
slowlearner2010
Newbie Poster
10 posts since May 2010
Reputation Points: 9
Solved Threads: 0
Skill Endorsements: 0

thanks Ancient Dragon,

really? thank for your info, i didn't notice it but everytime i start dat program it'll keep remind me that 20 more days left...i think to used it maybe....it quite confusing me, but it ok...i still have time to use it...ok, regarding my question, actually i already made 2 Form which i named it Form 1 and Form 2....i put a button on Form 1, so when i click that button it'll display Form 2...but nothing happen when i run it.....i'll try a lot of source from Mr Google....

Here is my code that i put in Form 1:

private: System::Void button1_Click(System::Object^ sender, System::EventArgs^ e) {

pg1 ^page 1 = gcnew pg 1();
page 1->Show(this);

}

slowlearner2010
Newbie Poster
10 posts since May 2010
Reputation Points: 9
Solved Threads: 0
Skill Endorsements: 0

>>page 1->Show(this);
Remove the parameter. Just this: page1->Show(); I created a Forms application that contained two forms and this worked for me

private: System::Void button4_Click(System::Object^  sender, System::EventArgs^  e) {
    Form2^ f = gcnew Form2;
    f->Show();
         }
};
Ancient Dragon
Achieved Level 70
Team Colleague
32,104 posts since Aug 2005
Reputation Points: 5,836
Solved Threads: 2,575
Skill Endorsements: 68

huhu thank 4 your attention Mr ancient dragon...
finally i made it...yee hauu....thank...thank...:)

slowlearner2010
Newbie Poster
10 posts since May 2010
Reputation Points: 9
Solved Threads: 0
Skill Endorsements: 0
Question Answered as of 3 Years Ago by Ancient Dragon and NathanOliver

thanks Ancient Dragon,

really? thank for your info, i didn't notice it but everytime i start dat program it'll keep remind me that 20 more days left...i think to

Sorry to bump your solved thread, but go to the help menu and the 6th option down is "Register Product". Do their little dance (ultraeasy if you already have hotmail or other M$ stuff) and that message will go away.

jonsca
Quantitative Phrenologist
Team Colleague
5,621 posts since Sep 2009
Reputation Points: 1,165
Solved Threads: 583
Skill Endorsements: 11

thanks 4 ur attention, jonsca....i'll do it later

slowlearner2010
Newbie Poster
10 posts since May 2010
Reputation Points: 9
Solved Threads: 0
Skill Endorsements: 0

This question has already been solved: Start a new discussion instead

Post: Markdown Syntax: Formatting Help
 
You
 
© 2013 DaniWeb® LLC
Page rendered in 0.0771 seconds using 2.68MB