<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	>
<channel>
	<title>Comments on: Windows and Handles</title>
	<atom:link href="http://jalaj.net/2007/01/27/windows-and-handles/feed/" rel="self" type="application/rss+xml" />
	<link>http://jalaj.net/2007/01/27/windows-and-handles/</link>
	<description>A Technical Blog</description>
	<pubDate>Tue, 13 May 2008 17:38:14 +0000</pubDate>
	<generator>http://wordpress.org/?v=MU</generator>
		<item>
		<title>By: Jalaj</title>
		<link>http://jalaj.net/2007/01/27/windows-and-handles/#comment-3972</link>
		<dc:creator>Jalaj</dc:creator>
		<pubDate>Tue, 12 Jun 2007 10:27:23 +0000</pubDate>
		<guid isPermaLink="false">http://jalaj.wordpress.com/2007/01/27/windows-and-handles/#comment-3972</guid>
		<description>@Santosh,

The solution might be. Enumerate all windows, look for all windows with Window Text containing "Internet Explorer" and any other text that determines the page you are looking to update from VB. The Form controls on the web page are not independent windows so you will not get handle to those.

Once you have found the top-level window handle for Internet Explorer may be you can use sendkeys function on press of button on VB form to send the text to IE Form...</description>
		<content:encoded><![CDATA[<p>@Santosh,</p>
<p>The solution might be. Enumerate all windows, look for all windows with Window Text containing &#8220;Internet Explorer&#8221; and any other text that determines the page you are looking to update from VB. The Form controls on the web page are not independent windows so you will not get handle to those.</p>
<p>Once you have found the top-level window handle for Internet Explorer may be you can use sendkeys function on press of button on VB form to send the text to IE Form&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: santosh choudhary</title>
		<link>http://jalaj.net/2007/01/27/windows-and-handles/#comment-3968</link>
		<dc:creator>santosh choudhary</dc:creator>
		<pubDate>Tue, 12 Jun 2007 08:55:22 +0000</pubDate>
		<guid isPermaLink="false">http://jalaj.wordpress.com/2007/01/27/windows-and-handles/#comment-3968</guid>
		<description>Urgent :

The problem is  I have a seprate web page running. It has no linked with VB.
Now we have a vb form , On vb form there is some textbox and button, what we have to do , we have to paste the value from vb textbox to web page textbox after click on button in vb form..</description>
		<content:encoded><![CDATA[<p>Urgent :</p>
<p>The problem is  I have a seprate web page running. It has no linked with VB.<br />
Now we have a vb form , On vb form there is some textbox and button, what we have to do , we have to paste the value from vb textbox to web page textbox after click on button in vb form..</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Just Looking Back &#171; Jalaj</title>
		<link>http://jalaj.net/2007/01/27/windows-and-handles/#comment-3376</link>
		<dc:creator>Just Looking Back &#171; Jalaj</dc:creator>
		<pubDate>Mon, 28 May 2007 06:27:26 +0000</pubDate>
		<guid isPermaLink="false">http://jalaj.wordpress.com/2007/01/27/windows-and-handles/#comment-3376</guid>
		<description>[...] Windows and Handles [...]</description>
		<content:encoded><![CDATA[<p>[...] Windows and Handles [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jalaj</title>
		<link>http://jalaj.net/2007/01/27/windows-and-handles/#comment-220</link>
		<dc:creator>Jalaj</dc:creator>
		<pubDate>Wed, 14 Mar 2007 06:09:00 +0000</pubDate>
		<guid isPermaLink="false">http://jalaj.wordpress.com/2007/01/27/windows-and-handles/#comment-220</guid>
		<description>If you are looking forward to get the handle to a specific control, as I did in &lt;a href="http://jalaj.wordpress.com/2006/12/13/adding-file-names-to-a-listbox-2/" rel="nofollow"&gt;Adding File Names to a ListBox - 2&lt;/a&gt; then, using FindWindowEx giving the Class Name is ok... otherwise if you are looking for getting handles to all child windows then I suggest using &lt;a href="http://jalaj.wordpress.com/2007/02/11/more-winapi-functions-for-callback/" rel="nofollow"&gt;EnumChildWindows&lt;/a&gt; which will make callback for every child windows (and their children).

A little code for illustration, assumes you have a form and a list box on it.

&lt;b&gt;Code on Form&lt;/b&gt;:

Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" ( _
     ByVal lpClassName As String, ByVal lpWindowName As String) As Long

Private Declare Function EnumChildWindows Lib "user32" ( _
ByVal hWndParent As Long, ByVal lpEnumFunc As Long, ByVal lParam As Long) As Long

Private Sub Form_Click()

    Dim x As Long
    
    x = FindWindow("OpusApp", "Untitled Message")
    EnumChildWindows x, AddressOf EnumWindowsProc, 0

End Sub


&lt;b&gt;Code in Module&lt;/b&gt;:

Public Function EnumWindowsProc(ByVal hwnd As Long, ByVal lParam As Long) As Long

    Form1.List1.AddItem hwnd
    
    EnumWindowsProc = True

End Function
</description>
		<content:encoded><![CDATA[<p>If you are looking forward to get the handle to a specific control, as I did in <a href="http://jalaj.wordpress.com/2006/12/13/adding-file-names-to-a-listbox-2/" rel="nofollow">Adding File Names to a ListBox - 2</a> then, using FindWindowEx giving the Class Name is ok&#8230; otherwise if you are looking for getting handles to all child windows then I suggest using <a href="http://jalaj.wordpress.com/2007/02/11/more-winapi-functions-for-callback/" rel="nofollow">EnumChildWindows</a> which will make callback for every child windows (and their children).</p>
<p>A little code for illustration, assumes you have a form and a list box on it.</p>
<p><b>Code on Form</b>:</p>
<p>Private Declare Function FindWindow Lib &#8220;user32&#8243; Alias &#8220;FindWindowA&#8221; ( _<br />
     ByVal lpClassName As String, ByVal lpWindowName As String) As Long</p>
<p>Private Declare Function EnumChildWindows Lib &#8220;user32&#8243; ( _<br />
ByVal hWndParent As Long, ByVal lpEnumFunc As Long, ByVal lParam As Long) As Long</p>
<p>Private Sub Form_Click()</p>
<p>    Dim x As Long</p>
<p>    x = FindWindow(&#8221;OpusApp&#8221;, &#8220;Untitled Message&#8221 <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /><br />
    EnumChildWindows x, AddressOf EnumWindowsProc, 0</p>
<p>End Sub</p>
<p><b>Code in Module</b>:</p>
<p>Public Function EnumWindowsProc(ByVal hwnd As Long, ByVal lParam As Long) As Long</p>
<p>    Form1.List1.AddItem hwnd</p>
<p>    EnumWindowsProc = True</p>
<p>End Function</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: bob</title>
		<link>http://jalaj.net/2007/01/27/windows-and-handles/#comment-217</link>
		<dc:creator>bob</dc:creator>
		<pubDate>Tue, 13 Mar 2007 09:09:10 +0000</pubDate>
		<guid isPermaLink="false">http://jalaj.wordpress.com/2007/01/27/windows-and-handles/#comment-217</guid>
		<description>I have a form created with Visual FoxPro 5. I wonder why I can't get any handle for the child windows? (I'm using Delphi). FindWindow functions finds the parent window, but FindWindowEx doesn't get the child window.
I also use WinID to identify this form, it also can not find the child window..
Any idea?</description>
		<content:encoded><![CDATA[<p>I have a form created with Visual FoxPro 5. I wonder why I can&#8217;t get any handle for the child windows? (I&#8217;m using Delphi). FindWindow functions finds the parent window, but FindWindowEx doesn&#8217;t get the child window.<br />
I also use WinID to identify this form, it also can not find the child window..<br />
Any idea?</p>
]]></content:encoded>
	</item>
</channel>
</rss>
