Quantcast
Channel: VBForums
Viewing all articles
Browse latest Browse all 15908

Getting the IUnknown Iterface from the IAccessible interface ?

$
0
0
Hi all,

The MSFORMS library implements the IAccessible Interface... One way of getting a pointer to the accessible interface is by declaring the variable as IAccessible and then using the VB Set statement as shown in the code below:

Now, I want to do the reverse operation, meaning: I want to get the form's IUnknwon interface from the accessible pointer (see code below)

Code:

Private Sub UserForm_Click()

  'get the IAccessible Interface from the Form's IUnknown interface
    Dim iAcc As IAccessible
   
    Set iAcc = Me
   
    MsgBox iAcc.accName(0&) '< successfully returns the userform UI caption
   
  'Now the opposite ???
  'How do I get Form's IUnknown interface from iAcc variable ?

End Sub


Viewing all articles
Browse latest Browse all 15908

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>