<?xml version="1.0" encoding="utf-8" ?>
<?xml-stylesheet type="text/xsl" href="RSS_xslt_style.asp" version="1.0" ?>
<rss version="2.0" xmlns:WebWizForums="https://syndication.webwiz.net/rss_namespace/">
 <channel>
  <title>Codejock Developer Community : Getting the child handle</title>
  <link>http://forum.codejock.com/</link>
  <description><![CDATA[This is an XML content feed of; Codejock Developer Community : Controls : Getting the child handle]]></description>
  <copyright>Copyright (c) 2006-2013 Web Wiz Forums - All Rights Reserved.</copyright>
  <pubDate>Wed, 13 May 2026 09:42:48 +0000</pubDate>
  <lastBuildDate>Mon, 21 Mar 2011 07:12:00 +0000</lastBuildDate>
  <docs>http://blogs.law.harvard.edu/tech/rss</docs>
  <generator>Web Wiz Forums 12.04</generator>
  <ttl>360</ttl>
  <WebWizForums:feedURL>forum.codejock.com/RSS_post_feed.asp?TID=18076</WebWizForums:feedURL>
  <image>
   <title><![CDATA[Codejock Developer Community]]></title>
   <url>http://forum.codejock.com/forum_images/codejock-logo.gif</url>
   <link>http://forum.codejock.com/</link>
  </image>
  <item>
   <title><![CDATA[Getting the child handle :   Or if you&amp;#039;d prefer to...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=18076&amp;PID=63417&amp;title=getting-the-child-handle#63417</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=2960">Xander75</a><br /><strong>Subject:</strong> 18076<br /><strong>Posted:</strong> 21 March 2011 at 7:12am<br /><br />Or if you'd prefer to use an API, you can do this with one line of code in the "NavigateButtonClick" event...<br><br><table width="99%"><tr><td><pre class="BBcode"><br>Private Declare Function PostMessage Lib "user32.dll" Alias "PostMessageA" (ByVal hwnd As Long, _<br>ByVal wMsg As Long, ByVal wParam As Long, ByVal lParam As Long) As Long<br><br>Const WM_CLOSE = &amp;H10<br><br>Private Sub Form_Load()<br>&nbsp;&nbsp;&nbsp; wndTab.ShowCloseItemButton = xtpTabItemButtonSelected<br>&nbsp;&nbsp;&nbsp; wndTab.InsertItem 0, "Example Tab", Form2.hwnd, 0<br>&nbsp;&nbsp;&nbsp; wndTab.InsertItem 1, "Example Tab", Form3.hwnd, 0<br>End Sub<br><br>Private Sub wndTab_NavigateButtonClick(ByVal Id As Long, Cancel As Variant)<br>&nbsp;&nbsp;&nbsp; PostMessage wndTab.Selected.Handle, WM_CLOSE, 0&amp;, 0&amp;<br>End Sub<br></pre></td></tr></table><br>]]>
   </description>
   <pubDate>Mon, 21 Mar 2011 07:12:00 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=18076&amp;PID=63417&amp;title=getting-the-child-handle#63417</guid>
  </item> 
  <item>
   <title><![CDATA[Getting the child handle :    Hi,Use the following code...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=18076&amp;PID=63415&amp;title=getting-the-child-handle#63415</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=2960">Xander75</a><br /><strong>Subject:</strong> 18076<br /><strong>Posted:</strong> 21 March 2011 at 6:25am<br /><br />Hi,<br><br>Use the following code to resolve the issue you have of closing the child form.<br><br><table width="99%"><tr><td><pre class="BBcode"><br>Private Sub wndTab_NavigateButtonClick(ByVal Id As Long, Cancel As Variant)<br>&nbsp;&nbsp;&nbsp; Dim i As Long<br><br>&nbsp;&nbsp;&nbsp; For i = Forms.Count - 1 To 0 Step -1<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; If Forms(i).hWnd = wndTab.Selected.Handle Then<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Unload Forms(i)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; End If<br>&nbsp;&nbsp;&nbsp; Next<br>End Sub<br></pre></td></tr></table><br>]]>
   </description>
   <pubDate>Mon, 21 Mar 2011 06:25:15 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=18076&amp;PID=63415&amp;title=getting-the-child-handle#63415</guid>
  </item> 
  <item>
   <title><![CDATA[Getting the child handle : This is what I am doing... is...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=18076&amp;PID=63400&amp;title=getting-the-child-handle#63400</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=1821">eSynaptic</a><br /><strong>Subject:</strong> 18076<br /><strong>Posted:</strong> 19 March 2011 at 10:06pm<br /><br />This is what I am doing... is there an easier way?<br><br>Private Sub wndTab_NavigateButtonClick(ByVal Id As Long, Cancel As Variant)<br>On Error Resume Next<br>Dim i As Long<br>Dim szTag As String<br>Dim oFrm As Form<br><br>szTag = wndTab.Selected.Tag<br><br>'find the tag name<br>For i = Forms.Count - 1 To 1 Step -1<br>&nbsp;&nbsp;&nbsp; DoEvents<br>&nbsp;&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp; If Forms(i).Tag = szTag Then<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Unload Forms(i)<br>&nbsp;&nbsp;&nbsp; End If<br>Next<br><br>End Sub<br><br>]]>
   </description>
   <pubDate>Sat, 19 Mar 2011 22:06:18 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=18076&amp;PID=63400&amp;title=getting-the-child-handle#63400</guid>
  </item> 
  <item>
   <title><![CDATA[Getting the child handle : I am dynamically loading a form...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=18076&amp;PID=63399&amp;title=getting-the-child-handle#63399</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=1821">eSynaptic</a><br /><strong>Subject:</strong> 18076<br /><strong>Posted:</strong> 19 March 2011 at 9:23pm<br /><br />I am dynamically loading a form as a tab item. When I hit the close button on the tab, how can I get the handle of the form so I can unload it when the tab closes?<br><br>example:<br><br>'load the form as a tab item<br>With wndTab<br>&nbsp;<br>&nbsp;Set nTab = .InsertItem(0, "Example Tab", form1.hWnd, 0<br>&nbsp;<br>End With<br><br>Now... using the NavigateButtonClick event, how can I get the loaded form to unload it?<br><br>Thank you!!<br><br>Jason<br><br>]]>
   </description>
   <pubDate>Sat, 19 Mar 2011 21:23:50 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=18076&amp;PID=63399&amp;title=getting-the-child-handle#63399</guid>
  </item> 
 </channel>
</rss>