Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

IAccessible type not defined visual basic

Tags:

vba

vb6

I have a old project in VB6

I want to use MSAA Accessebility and i get an error on this line:

Private Declare Function AccessibleChildren Lib "oleacc" (ByVal paccContainer As IAccessible, ByVal iChildStart As Long, ByVal cChildren As Long, rgvarChildren As Variant, pcObtained As Long) As Long

error: type not defined

I think IAccessible type not defined , how to correctly define it and use in VB6?


1 Answers

According to this article on brainbell.com, you must add a reference to oleacc.dll in order to be able to use the IAccessible type:

Before you start building your project you of course need to load the Microsoft Active Accessibility SDK (MSAASDK). After you've loaded the SDK, you must create a reference in your project to the Accessibility DLL, OLEACC.DLL.

Select References from the Project menu, then click the Browse button to find the OLEACC.DLL file. By default this file is located in the \Windows\System folder.

Once you've created the reference, you can view the Accessibility library through the Object Browser in Visual Basic.

When you select Accessibility from the Project/Library drop-down list in the Object Browser, you won't see anything in the Classes or Member Of lists because the Accessibility settings are hidden. You need to right-click in the Members Of pane and select Show Hidden Members to view the Accessibility classes and members.

like image 173
C-Pound Guru Avatar answered Jul 11 '26 12:07

C-Pound Guru



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!