<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML xmlns:o = "urn:schemas-microsoft-com:office:office"><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.2800.1458" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face=Arial size=2>I have not tried this at all but...</FONT></DIV>
<DIV><FONT face=Arial size=2>does using InsertControl or InsertComponent help 
?</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV>Regards<BR>Paul McKenzie<BR>SMSS Ltd.<BR>Wellington<BR>New Zealand</DIV>
<BLOCKQUOTE 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
  <DIV style="FONT: 10pt arial">----- Original Message ----- </DIV>
  <DIV 
  style="BACKGROUND: #e4e4e4; FONT: 10pt arial; font-color: black"><B>From:</B> 
  <A title=allan@workpace.com href="mailto:allan@workpace.com">Allan Vergara</A> 
  </DIV>
  <DIV style="FONT: 10pt arial"><B>To:</B> <A title=delphi@ns3.123.co.nz 
  href="mailto:delphi@ns3.123.co.nz">NZ Borland Developers Group - Delphi 
  List</A> </DIV>
  <DIV style="FONT: 10pt arial"><B>Sent:</B> Monday, November 01, 2004 9:45 
  AM</DIV>
  <DIV style="FONT: 10pt arial"><B>Subject:</B> [DUG] Form in DLL</DIV>
  <DIV><BR></DIV>
  <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'"><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>
  <P>
  <HR>

  <P></P>_______________________________________________<BR>Delphi mailing 
  list<BR>Delphi@ns3.123.co.nz<BR>http://ns3.123.co.nz/mailman/listinfo/delphi<BR></BLOCKQUOTE></BODY></HTML>