 |
BorlandTalk.com Borland discussion newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
Lawrence Tuppen Guest
|
Posted: Sat Aug 28, 2004 1:06 pm Post subject: How can I get BCB6 to start with Form2 not Form3 |
|
|
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
|
Posted: Mon Aug 30, 2004 12:50 pm Post subject: Re: How can I get BCB6 to start with Form2 not Form3 |
|
|
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
|
Posted: Tue Aug 31, 2004 9:58 pm Post subject: Re: How can I get BCB6 to start with Form2 not Form3 |
|
|
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 |
|
 |
|
|
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
|
|