Hello again :-)<br><br>I've included a TTimer in main form. It shows a message at start and every interval it changes a label (alternatively 1/2). I can see that it continues running (changing 1 to 2 and 2 to 1) ever if dll form is shown both in Mac and Win.<br>
<br>Juan.<br><br><br><div class="gmail_quote">2011/8/15 Michael Schnell <span dir="ltr"><<a href="mailto:mschnell@lumino.de">mschnell@lumino.de</a>></span><br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<div class="im">On 08/15/2011 02:21 PM, Juan Sánchez wrote:<br>
</div><div class="im"><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
. I've discovered a simple method that seems to run ok on both Win and<br>
Mac.<br>
</blockquote></div><div class="im">
You don't create the application instance but you initialize it.<br>
<br>
Seemingly this does not harm the Application instance of the main executable. So it seems like the DLL automatically instantiates it's own independent Application instance (and has its own "Application" variable to manage same).<br>
<br>
This in fact is possible. You might want to verify this by printing both the Application pointers via IntToHex(integer(Application))<u></u>, 8) ) and verify that they are different.<br>
<br>
As you don't use a thread, I suppose Application.Initialize in the DLL re-attaches the GUI framework to the main thread. I suppose this will freeze or destroy the GUI of the main program. This might or might not be desirable. I think it is not desirable, as e.g. TTimers are handled via the GUI binding.<br>
<br>
You might want to check if the GUI and/or the TTimers of the main program are still workable wile/after the DLL's GUI is displayed.<br>
<br></div><div><div></div><div class="h5">
-Michael<br>
<br>
<br>
<br>
<br>
<br>
--<br>
______________________________<u></u>_________________<br>
Lazarus mailing list<br>
<a href="mailto:Lazarus@lists.lazarus.freepascal.org" target="_blank">Lazarus@lists.lazarus.<u></u>freepascal.org</a><br>
<a href="http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus" target="_blank">http://lists.lazarus.<u></u>freepascal.org/mailman/<u></u>listinfo/lazarus</a><br>
</div></div></blockquote></div><br>