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)
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