CFanatic

Go Back   CFanatic > Programming > C++ Programming

Join CFanatic Forum Now

HELP with C++ - Forms Application topic posted under C++ Programming which is a part of Programming category in CFanatic Forum
Reply
 
Thread Tools Display Modes
  #1  
Old 06-07-2007, 09:58 AM
Junior Member
 
Join Date: Jun 2007
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
miklavcicmatic is on a distinguished road
| More
Question HELP with C++ - Forms Application

Hello!
I am a newbie in C++ so do not laugh if i ask something n00bish...
Ok here is my problem:
I have Form1 and Form2.
On Form1 there is a Button named Button1.

#include "Form2"
Form2->Show; -->ERROR!

When i click that button i want the Form2 to show.
I've tryed but i can't figure it out. PLZ HELP...
P.S.- I am veary good at VB if that helps...
Other functions in cpp - i'll manage.
Any Tutorial or sample code will be usefull..



------------------------------------------------
Matic Miklavčič, 15y old, From Slovenia

Last edited by miklavcicmatic; 06-07-2007 at 10:02 AM.
Reply With Quote
  #2  
Old 06-07-2007, 10:44 AM
shabbir's Avatar
Administrator
 
Join Date: Sep 2006
Posts: 1,158
Thanks: 48
Thanked 62 Times in 43 Posts
shabbir has a spectacular aura aboutshabbir has a spectacular aura about
| More
Re: HELP with C++ - Forms Application

In Button's Click event handler you have to create an object of Form2 and then call the DoModal Function. (I am assuming you are on Windows Platform.)
Reply With Quote
  #3  
Old 06-09-2007, 02:14 PM
Junior Member
 
Join Date: Jun 2007
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
miklavcicmatic is on a distinguished road
| More
Re: HELP with C++ - Forms Application

Yes, i am on windows. Can u please make a sample code???
It would be veary useful.
Thanks!
Reply With Quote
  #4  
Old 06-09-2007, 02:23 PM
Junior Member
 
Join Date: Jun 2007
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
miklavcicmatic is on a distinguished road
| More
Wink Re: HELP with C++ - Forms Application

Yo man! I figure it out!!!!!!!!
Code:
private: System::Windows::Forms::Form^  Form2;
this->Form2 = (gcnew System::Windows::Forms::Form());


private: System::Void button1_Click(System::Object^  sender, System::EventArgs^  e) {
				 this->Form2->Show();
}
LOL an easy code....
Thanks for a hint! Bye.

Mickey a.k.a. Matic

Last edited by shabbir; 06-10-2007 at 02:42 AM. Reason: Code block
Reply With Quote
  #5  
Old 06-10-2007, 02:44 AM
shabbir's Avatar
Administrator
 
Join Date: Sep 2006
Posts: 1,158
Thanks: 48
Thanked 62 Times in 43 Posts
shabbir has a spectacular aura aboutshabbir has a spectacular aura about
| More
Re: HELP with C++ - Forms Application

Kool
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Capture video from application rao C++ Programming 1 01-06-2009 04:07 AM
win32 console application using MFC chaitanya.vemasani MFC Programming 4 11-14-2008 07:09 AM
Doubt in MDI application dathatreya MFC Programming 1 07-08-2008 02:32 AM
convert dialog application rachel196 MFC Programming 1 06-26-2008 10:31 AM
Custom application setting cygnusX C# Programming 0 10-08-2007 09:15 AM

 

Advertisement

CFanatic Search
Custom Search

Advertisement

All times are GMT -5. The time now is 03:32 PM.



Powered by vBulletin® Version 3.7.4
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO ©2010, Crawlability, Inc.
Cfanatic.com is a premier member of the IDG TechNetwork. For advertising opportunities contact here
Get Paid for Working on Projects Matching Your Expertise at Go4Expert's Jobs Board