Accessing the Control from Visual Basic and Other Programming Languages

You can also use Microsoft Agent's control from Visual Basic® and other programming languages. Make sure that the language fully supports the ActiveX control interface, and follow its conventions for adding and accessing ActiveX controls.

Accessing Microsoft Agent's control from Visual Basic requires that you first create the control. The easiest way to do this is to place an instance of the control on a form. (You may have to add the control to your toolbox before adding it to your form.) Follow Visual Basic syntax for specifying methods, properties, or events. Using Microsoft Agent's control with Visual Basic is very similar to using the control with VBScript, except that events in Visual Basic must include the data type of passed parameters. However, adding the Microsoft Agent control to a form will automatically include Microsoft Agent's events with their appropriate parameters. For more advanced scenarios, such as creating an Agent control at run time, see the Connected property.

Most programming languages that support ActiveX controls follow conventions similar to Visual Basic. For programming languages that do not support object collections, you can use the Character method and Command method to access methods and properties of items in the collection.