Board index » delphi » DLL Modal Form

DLL Modal Form

I have a main program call an external DLL which contains a modal form.
The calling programs also pass the application.handle to the dll.

What is unexpected in the situation  is when I close the modal form, the main
program get minimize.

Can anyone tell me what is happening?

Ken

-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/rg_mkgrp.xp   Create Your Own Free Member Forum

 

Re:DLL Modal Form


set the parent of the Form in the DLL to Nil before closing it,.

kenneth...@my-dejanews.com wrote in article
<6pamau$fn...@nnrp1.dejanews.com>...

Quote
> I have a main program call an external DLL which contains a modal form.
> The calling programs also pass the application.handle to the dll.

> What is unexpected in the situation  is when I close the modal form, the
main
> program get minimize.

> Can anyone tell me what is happening?

> Ken

> -----== Posted via Deja News, The Leader in Internet Discussion ==-----
> http://www.dejanews.com/rg_mkgrp.xp   Create Your Own Free Member Forum

Re:DLL Modal Form


In article <6pamau$fn...@nnrp1.dejanews.com>, kenneth...@my-dejanews.com
(kenneth...@my-dejanews.com) says...

Quote
> I have a main program call an external DLL which contains a modal form.
> The calling programs also pass the application.handle to the dll.

> What is unexpected in the situation  is when I close the modal form, the main
> program get minimize.

> Can anyone tell me what is happening?

D2 has an interesting side-effect as the first autocreate form would be
the application. If you autocreate forms in a DLL, the first will
'believe' it's the main form so when it' closed, the real app will start
acting strange. I don't know if this has anything to do with your
problem, but I just added a dummy form that was never closed as the first
form to be created using Application.CreateForm.

M.

--
Ettertraktet kaffe, er det ekstra god kaffe?
mailto:martin.lars...@delfidata.no.NOSPAM
http://www.delfidata.no/users/~martin

Other Threads