タイトル : Re: VBから フォーム外のテキスト入力ボックスへの入力 投稿日 : 2012/06/02(Sat) 16:21 投稿者 : 魔界の仮面弁士
> そのボックスの座標の位置などは 「など」との事ですが、座標以外にはどのような情報を得られていますか? IHTMLDocument 経由で、対象の IHTMLInputTextElement を得られているなら、 その value プロパティを使って、テキストボックスの内容を読み書きできます。 対象の IAccessible インターフェイスを取得できているなら、 accValue プロパティが使えるでしょう。 Option Explicit Private Declare Function AccessibleObjectFromPoint Lib "oleacc" _ (ByVal xScreen As Long, _ ByVal yScreen As Long, _ ByRef ppvObject As Any, _ ByRef pvarChild As Variant) As Long Private Sub Command1_Click() Dim x As Long, y As Long x = CLng(Text1.Text) y = CLng(Text2.Text) Dim acc As IAccessible Dim child As Variant AccessibleObjectFromPoint x, y, acc, child acc.accValue() = "新しい文字列" & CStr(Timer) End Sub |