<!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>&nbsp;</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&nbsp;DLL that I want 
to dock on a panel that live in the main application.&nbsp; I'm passing the 
handle of the panel on to the&nbsp;DLL and using Windows.SetParent to dock the 
form.&nbsp; This works fine but the DLL form doesn't get any focus when I tab 
around the main application form.&nbsp; Furthermore, when I manually set 
focus&nbsp;on one of the control&nbsp;on&nbsp;the DLL form, I noticed that the 
main application form loses focus.&nbsp; </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>&nbsp;</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&nbsp;app's TApplication&nbsp;handle and the DLL TAplication handle; no luck 
there.&nbsp; I've also tried assigning the panel's handle to the 
ParentWindow&nbsp;property of&nbsp;the DLL form and I got some interesting 
behaviours.<SPAN style="mso-spacerun: yes">&nbsp; </SPAN>The DLL form 
now&nbsp;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.&nbsp; 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&nbsp; (I have tabstop set to true for all 3 
controls).&nbsp;&nbsp;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>&nbsp;</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>&nbsp; 
</FONT></SPAN><o:p></o:p></SPAN></P></DIV></BODY></HTML>