Board index » cppbuilder » Main form activation

Main form activation

Hi

I have application that has two forms. Second form is shown from main
form using ->Show(), and it is dinamically created using CreateForm.
.
I need this second form to be independent from main form. Meaning that
when both forms are visible and when I click on second form I don't
want mainform to jump to foreground just below second form. I have
tried to put second form's parent to NULL but it reacts the same.
Also second form has AlwaysOnTop flag.

And how can I remove second form's button on taskbar?

Thanks
Marin Jenssen

 

Re:Main form activation


Quote
Marin Jenssen <software6...@hotmail.com> wrote in message

news:3a967678.10725262@forums.inprise.com...

Quote
> I have application that has two forms. Second form is shown from main
> form using ->Show(), and it is dinamically created using CreateForm.

> I need this second form to be independent from main form.

Then don't use CreateForm(), that's the problem.  Use the 'new' operator
instead, and don't specify an Owner, ie:

    TMySecondForm *form = new TMySecondForm(NULL);
    form->Show();
    (be sure to create on OnClose event handler and set Action = caFree)

Quote
> And how can I remove second form's button on taskbar?

Like this:
    ShowWindow(Handle, SW_HIDE);

Gambit

Re:Main form activation


On Fri, 23 Feb 2001 08:57:22 -0800, "Remy Lebeau" <gambi...@gte.net>
wrote:

Quote

>Marin Jenssen <software6...@hotmail.com> wrote in message
>news:3a967678.10725262@forums.inprise.com...

>> I have application that has two forms. Second form is shown from main
>> form using ->Show(), and it is dinamically created using CreateForm.

>> I need this second form to be independent from main form.

>Then don't use CreateForm(), that's the problem.  Use the 'new' operator
>instead, and don't specify an Owner, ie:

>    TMySecondForm *form = new TMySecondForm(NULL);
>    form->Show();
>    (be sure to create on OnClose event handler and set Action = caFree)

>> And how can I remove second form's button on taskbar?

>Like this:
>    ShowWindow(Handle, SW_HIDE);

>Gambit

Hi

I tried creating window with new exactly like that but when I click on
new window it still brings up main form.

Re:Main form activation


Always worked fine for me before.  Could you post a small snippet of code
that demonstrates your problem?

Gambit

Quote
"Marin Jenssen" <software6...@hotmail.com> wrote in message

news:3a96ef7c.12810901@forums.inprise.com...
Quote
> I tried creating window with new exactly like that but when I click on
> new window it still brings up main form.

Other Threads