| 魔界の仮面弁士 様
大変お世話になっております。 ご教授頂いた方法で少し前進致しました。
FindWindowExWの値は0ですが、FindWindowではハンドル値取得できました。
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
PWnd1 = FindWindowExW(IntPtr.Zero, IntPtr.Zero, "TabThumbnailWindow", "JavaScript テスト - Internet Explorer") PWnd2 = FindWindow("TabThumbnailWindow", "JavaScript テスト - Internet Explorer")
Debug.WriteLine(PWnd1) Debug.WriteLine(PWnd2)
Dim o As Object = GetIEDocument(PWnd2) ' No90411 を参照 doc = DirectCast(o, mshtml.HTMLDocument) yahooButton = DirectCast(doc.all.item("yahoo"), mshtml.IHTMLElement) Event1 = DirectCast(yahooButton, mshtml.HTMLInputTextElementEvents2_Event) AddHandler Event1.onclick, AddressOf WebDisp_click
End Sub
その結果、yahooButton = DirectCast(doc.all.item("yahoo"), mshtml.IHTMLElement)の行にて下記エラーが発生致しました。
エラー:System.NullReferenceException HResult=0x80004003 Message=オブジェクト参照がオブジェクト インスタンスに設定されていません。
******************************
現在、取り組んでいる案件は、下記の通りです。 WEBページ・・・CreateObject("Shell.Application").Windowsで対応しております。 ↓ 上記WEBページから派生したWEBページダイアログ ・・・ GetIEDocument で対応(現在、ここのボタンクリックのイベントを対応しております。) ↓ 上記WEBページダイアログから派生したWEBページダイアログ ・・・ GetIEDocument で対応
何卒、ご教授の程、宜しくお願いいたします。
|