🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: borland.public.cppbuilder.nativeapi
3 messages
3 total messages Started by Ted Tripp Fri, 03 Mar 2006 04:37
tcolordialog in dll
#4197
Author: Ted Tripp
Date: Fri, 03 Mar 2006 04:37
15 lines
1268 bytes
Hi,

BCB5

I have an app that loads a dll form and in this form I call a colordialog. 
After clicking the OK or Cancel in the colordialog, the form appears to go 
behind the app.

I tried using a variety of ShowWindow's, but don't seem to have any way of 
control the MainForm from within the dll.

Any ideas on how to keep my dll form on top?

Regards,
TT 
Re: tcolordialog in dll
#4199
Author: Dennis Jones
Date: Fri, 03 Mar 2006 16:09
25 lines
1777 bytes
"Ted Tripp" <ttripp@rankexec.com> wrote in message
news:4407c806$1@newsgroups.borland.com...
> Hi,
>
> BCB5
>
> I have an app that loads a dll form and in this form I call a colordialog.
> After clicking the OK or Cancel in the colordialog, the form appears to go
> behind the app.
>
> I tried using a variety of ShowWindow's, but don't seem to have any way of
> control the MainForm from within the dll.
>
> Any ideas on how to keep my dll form on top?

Is it a VCL form?  Is the form in a DLL or a package (BPL)?

If you are using a VCL form in a DLL, are you setting the DLL's
Application->Handle property before trying to create any forms in the DLL?
If you are not doing this, you should.  The DLL's Application->Handle
property must be set to the handle of the EXE's main window otherwise you
will get odd behavior like that which you are describing.

- Dennis
Re: tcolordialog in dll
#4203
Author: Ted Tripp
Date: Sat, 04 Mar 2006 03:39
35 lines
2065 bytes
OK, thanks Dennis.  Yes, VCL.  I'll take this approach.


"Dennis Jones" <nospam@nospam.com> wrote in message 
news:44086a31$1@newsgroups.borland.com...
>
> "Ted Tripp" <ttripp@rankexec.com> wrote in message
> news:4407c806$1@newsgroups.borland.com...
>> Hi,
>>
>> BCB5
>>
>> I have an app that loads a dll form and in this form I call a 
>> colordialog.
>> After clicking the OK or Cancel in the colordialog, the form appears to 
>> go
>> behind the app.
>>
>> I tried using a variety of ShowWindow's, but don't seem to have any way 
>> of
>> control the MainForm from within the dll.
>>
>> Any ideas on how to keep my dll form on top?
>
> Is it a VCL form?  Is the form in a DLL or a package (BPL)?
>
> If you are using a VCL form in a DLL, are you setting the DLL's
> Application->Handle property before trying to create any forms in the DLL?
> If you are not doing this, you should.  The DLL's Application->Handle
> property must be set to the handle of the EXE's main window otherwise you
> will get odd behavior like that which you are describing.
>
> - Dennis
>
> 
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads