Using as an Active-X control

Before an Active-X component may be used within a particular Windows installation it must be registered with the Windows System Registry. The Setup program that installs the product on your system provides automatic one-time registration. However, if you use the component on another system registration may NOT be automatic. Many container applications (Visual Basic, MS Office, etc.) offer facilities to register components by displaying a dialog and browsing for the component's file – dbarscan.dll. As a last resort, the component may be registered manually be executing the following commands from within a command prompt:

To register the component

C:\path\regsvr32.exe C:\path\DBARSCAN.DLL.

Similarly the component may be un-registered using:

C:\path\regsvr32.exe C:\path\DBARSCAN.DLL -u.

If the component is moved or upgraded it must be re-registered.

Once registered the component may be used within Visual Basic 6 (and other environments). The dBarScan Control may be included on Visual Basic's Toolbar by checking the

dBarScan ActiveX Control Module

entry in the Custom Controls dialog accessible on the Tools menu. The Control then appears as an icon on the toolbar.

To add the control to a VB form simply select the control then draw a box for it on the form with the left mouse button held down. The control has no visible interface at run-time, so the placement of the control is not important. The first control placed on a form will be named dBarScan1 by default. Properties that are not Read Only may be set at design time using the Propeties box.

Properties of the control may also be set programmatically with commands of the form:

dBarScan1.bSelection=true

and methods invoked using:

i=dBarScan1.scan()

The VBDemo program illustrates the use of the dBarScan control in a Visual Basic 6 program.

More:

Using as a DLL