AccessibleObjectFromPoint : how-to?

  • Thread starter Willian F. Lopes
  • Start date
W

Willian F. Lopes

Hi!

I'm trying to use AccessibleObjectFromPoint in code below.

**********************

Public Class Form1

Dim p As POINTAPI
Dim objAccessible As Object
Dim v As Object
Dim sName As String
Dim l As Long

Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Timer1.Tick
Dim objAcessible As Object
Dim v As Object

' Get IAccessible interface from object under pointer.
AccessibleObjectFromPoint(Windows.Forms.Cursor.Position.X(),
Windows.Forms.Cursor.Position.Y(), objAccessible, v)

' Get name property of object under pointer.
sName = ""
On Error Resume Next
sName = objAccessible.ToString
Me.Text = sName
On Error GoTo 0
End Sub
End Class

**********************

Butt nothing happens, It's all empty!!! Where is the error?

thanks,

Willian
 
C

Cor Ligthert[MVP]

William,

Will you please be so kind not to multipost, I see a long discussion about
this in an other newsgroup.

Cor
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top