VB Developer's Reference

This section contains general reference information about Active Accessibility for Visual Basic developers. The following topics are discussed.


Visual Basic Method Notes

This section contains important notes that detail differences between the accessible object methods when called from Visual Basic versus C or C++.


Visual Basic Method Notes: accName

The Object Description Language (ODL) file, oleacc.odl, contains information that differs between the VB and C/C++ implementations. Oleacc.odl contains the following definition for the property-setting version of the function.

    [hidden, propput, id(DISPID_ACC_NAME)]
    HRESULT accName(
        [in, optional] VARIANT varChild,
        [in] BSTR szName);

Although the varChild parameter is listed as optional in the ODL file and the object browser, you must include it when calling the property setting version of accName.


Visual Basic Method Notes: accValue

The Object Description Language (ODL) file, oleacc.odl, contains information that differs between the VB and C/C++ implementations. Oleacc.odl contains the following definition for the property-setting version of the function.

    [hidden, propput, id(DISPID_ACC_VALUE)]
    HRESULT accValue(
        [in, optional] VARIANT varChild,
        [in] BSTR szValue);

Although the varChild parameter is listed as optional in the ODL file and the object browser, you must include it when calling the property setting version of accValue.


Visual Basic Sample: VBinsp

Currently, the Active Accessibility SDK includes one example of a Visual Basic application that incorporates Active Accessibility technology, called "VBinsp."

This application is very similar to the Inspect.exe C/C++ sample application, and provides a simple illustration of how a VB4 can incorporate Active Accessibility technology. The sample reports most of the Accessible information exposed by the object currently under the mouse pointer.

The VBinsp sample code incorporates a timer control that it uses to determine the time increments between each query. On every timer tick, the code queries the object under the pointer and displays the results in a Visual Basic form. In the SDK, VBinsp is not an executable file. Rather, it is a set of VB source code found in the samples directory.

© 1997 Microsoft Corporation. All rights reserved. Legal Notices.