<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=us-ascii">
<META content="MSHTML 6.00.2600.0" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><FONT size=2><SPAN
style="COLOR: blue; FONT-FAMILY: Arial">Good morning all,</SPAN><SPAN
style="FONT-SIZE: 12pt; FONT-FAMILY: 'Arial Unicode MS'"><?xml:namespace prefix
= o ns = "urn:schemas-microsoft-com:office:office"
/><o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><FONT size=2></FONT> </P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><FONT size=2><SPAN
style="COLOR: blue; FONT-FAMILY: Arial">I have a form in a DLL that I want
to dock on a panel that live in the main application. I'm passing the
handle of the panel on to the DLL and using Windows.SetParent to dock the
form. This works fine but the DLL form doesn't get any focus when I tab
around the main application form. Furthermore, when I manually set
focus on one of the control on the DLL form, I noticed that the
main application form loses focus. </SPAN><SPAN
style="FONT-FAMILY: 'Arial Unicode MS'; mso-fareast-font-family: 'Times New Roman'"><o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><FONT size=2></FONT> </P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><FONT size=2><SPAN
style="COLOR: blue; FONT-FAMILY: Arial">I've tried synchronizing the
main app's TApplication handle and the DLL TAplication handle; no luck
there. I've also tried assigning the panel's handle to the
ParentWindow property of the DLL form and I got some interesting
behaviours.<SPAN style="mso-spacerun: yes"> </SPAN>The DLL form
now receives focus and the main app's title bar seems to behave properly
but there is a problem... I have 3 TWinControl in my DLL form but for some
reason only one of them is getting focus. Say control1 has focus, the next
time I push the tab key, the focus jumps back on one of the control on the main
application (I have tabstop set to true for all 3
controls). This is causing me a lot of headaches lately so any
help/comments will be much appreciated :)</SPAN><SPAN
style="FONT-SIZE: 12pt; FONT-FAMILY: 'Arial Unicode MS'; mso-fareast-font-family: 'Times New Roman'"><o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><FONT size=2></FONT> </P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN
style="COLOR: blue; FONT-FAMILY: Arial"><FONT size=2>Cheers
folks</FONT></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN
style="COLOR: blue; FONT-FAMILY: Arial"><FONT size=2>Allan</FONT></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US
style="mso-ansi-language: EN-US"><SPAN style="mso-spacerun: yes"><FONT
face="Microsoft Sans Serif" size=2>
</FONT></SPAN><o:p></o:p></SPAN></P></DIV></BODY></HTML>