 |
BorlandTalk.com Borland discussion newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
remo Guest
|
Posted: Sun May 22, 2005 3:20 pm Post subject: (newbie) open second form |
|
|
Hi,
I have a first form (Form1) with a button.
I want display a second form (Form2) when I click the button.
What I must write in my source code?
what into:
Form1::TButtonClick (TObject *Sender)
{
......display Form2 ?????
}
I must declare also a new class Form2 ?
RE
|
|
| Back to top |
|
 |
Michael Kutscher Guest
|
Posted: Sun May 22, 2005 5:00 pm Post subject: Re: (newbie) open second form |
|
|
Hi,
| Quote: | I have a first form (Form1) with a button.
I want display a second form (Form2) when I click the button.
What I must write in my source code?
Form1::TButtonClick (TObject *Sender)
{
// .....display Form2 ?????
Form2->Show(); // Programm continues. |
// Form1 and Form2 are active and wait for user-input
//or Form2->ShowModal(); // Form1 will wait until Form2 is closed
| Quote: | }
I must declare also a new class Form2 ?
No, but You have to include the File with the declaration of Form2 into |
the source-File of Form1: From File-Menu: "Include Unit Header".
These questions look quite elementary. It might be a good idea, to look
for a tutorial or a book about builder.
Anyway: You are using a _great_ software-development-tool and the time
to understand its usage is a good investment.
Good Luck
Michael
|
|
| Back to top |
|
 |
remo Guest
|
Posted: Sun May 22, 2005 6:07 pm Post subject: R: (newbie) open second form |
|
|
TNX MICHAEL!!!!
REmo
Michael Kutscher <spam.ignore (AT) pc-coach (DOT) de> wrote in message
[email]4290bbe8_2 (AT) news (DOT) arcor-ip.de[/email]...
| Quote: | Hi,
I have a first form (Form1) with a button.
I want display a second form (Form2) when I click the button.
What I must write in my source code?
Form1::TButtonClick (TObject *Sender)
{
// .....display Form2 ?????
Form2->Show(); // Programm continues.
// Form1 and Form2 are active and wait for user-input
//or Form2->ShowModal(); // Form1 will wait until Form2 is closed
}
I must declare also a new class Form2 ?
No, but You have to include the File with the declaration of Form2 into
the source-File of Form1: From File-Menu: "Include Unit Header".
These questions look quite elementary. It might be a good idea, to look
for a tutorial or a book about builder.
Anyway: You are using a _great_ software-development-tool and the time
to understand its usage is a good investment.
Good Luck
Michael
|
|
|
| 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
|
|