ウィンドウハンドラを取得するFindeWindowEx変数の宣言 Private Declare Function FindWindow Lib "user32.dll" Alias "FindWindowA" _ (ByVal lpClassName As String, ByVal lpWindowName As String) As IntPtr Private Declare Function FindWindowEx Lib "user32.dll" Alias "FindWindowExA" _ (ByVal hWnd1 As IntPtr, ByVal hWnd2 As IntPtr, ByVal lpsz1 As String, ByVal lpsz2 As String) As IntPtr Spy++ツールを利用して、検索対象のクラス名を指定で、ウィンドウハンドラを取得する。 下図はSpy++ツールでIE9.0を例として、「テストHTML」というタブページのハンドラを取得する例です。 Dim hWndChild As IntPtr hWndChild = FindWindowEx(IntPtr.Zero, IntPtr.Zero, "IEFrame", Nothing) hWndChild = FindWindowEx(hWndChild, IntPtr.Zero, "Frame Tab", Nothing) hWndChild = FindWindowEx(hWndChild, IntPtr.Zero, "TabWindowClass", Nothing) hWndChild = FindWindowEx(hWndChild, IntPtr.Zero, "Shell DocObject View", Nothing) hWndChild = FindWindowEx(hWndChild, IntPtr.Zero, "Internet Explorer_Server", Nothing) あなたのお住まいの地域で最安のブロードバンド選び コメント: |