BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

How can I get BCB6 to start with Form2 not Form3

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> C++ Builder (IDE)
View previous topic :: View next topic  
Author Message
Lawrence Tuppen
Guest





PostPosted: Sat Aug 28, 2004 1:06 pm    Post subject: How can I get BCB6 to start with Form2 not Form3 Reply with quote



C++ Builder 6

I have three forms. Forms 2 and 3 are children, I can see one or the other.
I want to start with Form2 visible, but it always starts with Form3.
I tried "Form2->Show()" at the end of Form3's FormCreate but it does not
work.
The same code works later (when I doubleclick in Form3 or click a menu
item).

--
Lawrence Tuppen
Email: [email]TUPPENL (AT) mailaps (DOT) org[/email] Web: http://homepage.ntlworld.com/tuppenl


Back to top
Mike Crapo
Guest





PostPosted: Mon Aug 30, 2004 12:50 pm    Post subject: Re: How can I get BCB6 to start with Form2 not Form3 Reply with quote



This is due to the creation order. You can do one of two things.

1) Remove form 3 from your projects Auto-Created forms and over to
available forms. This will make it so you will need to create form 3
dynamically when you want it. - This is found in the Project / Options
menu, under the Forms tab.

2) Change the form creation order within you main .cpp file.

Change:
Application->CreateForm(__classid(TForm1), &Form1);
Application->CreateForm(__classid(TForm2), &Form2);
Application->CreateForm(__classid(TForm3), &Form3);

To:
Application->CreateForm(__classid(TForm1), &Form1);
Application->CreateForm(__classid(TForm3), &Form3);
Application->CreateForm(__classid(TForm2), &Form2);


On Sat, 28 Aug 2004 14:06:01 +0100, "Lawrence Tuppen"
<tuppenl (AT) ntlworld (DOT) com> wrote:

Quote:
C++ Builder 6

I have three forms. Forms 2 and 3 are children, I can see one or the other.
I want to start with Form2 visible, but it always starts with Form3.
I tried "Form2->Show()" at the end of Form3's FormCreate but it does not
work.
The same code works later (when I doubleclick in Form3 or click a menu
item).


Back to top
Lawrence Tuppen
Guest





PostPosted: Tue Aug 31, 2004 9:58 pm    Post subject: Re: How can I get BCB6 to start with Form2 not Form3 Reply with quote



Thank you. I have done (2) and it works well. I will remember (1) for the
future. I have only just started with Builder (its a price thing) and I am
trying to rewrite my old C++ programs into Builder. My next challenge is to
control window size dynamically depending on content, which was not all that
easy under C++ and is not even mentioned in my 'learn Builder' book. Thank
goodness I dont work for a living any more. Once again, thanks for your
help. You have made an old man happy.

<Mike Crapo> wrote

Quote:
This is due to the creation order. You can do one of two things.



Back to top
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> C++ Builder (IDE) All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.