Using Broker ActiveX Control with .NET

This document covers the following topics:

Using Broker ActiveX Control with Visual Studio .NET

Start of instruction setTo use Broker ActiveX Control with Visual Studio .NET

  1. Add Broker ActiveX Control to the Project references.

  2. Add a Broker Control variable BrokerLib.BrokerClass().

While you are using Broker ActiveX Control, the properties and methods of the object are listed in the member list.

To use custom data types you have to access the items through a temporary object. See Defining Custom Data Types.

A Small Visual Basic .NET Example

' create new ActiveX Control
Dim broker As New BrokerLib.BrokerClass()

Dim TransactionObject As Object
Dim SomeObject As Object
Dim CTObject As Object

' load tor object
TransactionObject = broker.CreateTransObject("Broker.tor")

' call a method from the tor object 
SomeObject = TransactionObject.GetData("Person1")

reference a temporary object to the Customer Data type

CTObject = SomeObject.CustData

' access to the items of the Customer Data
Console.WriteLine("Name  :" & CTObject.Name)  
Console.WriteLine("Address :" & CTObject.Address)