| Herd Software Development
DaVinci Graphics Library
DaVinci Documentation Home Search Order

Tutorial for Visual Basic 4/5/6


As Visual Basic programmer you can develop your applications easily based on the DavCtl ActiveX control, contained in the file DAVINCI3.OCX and/or DAV3.OCX. This OCX-File requires no further DLLs. You can also call DLL-Functions directly from Visual basic by adding corresponding Declare Statements to your basic program.

OCX registration

So that your application program can use the ActiveX component, the DAVINCI3.OCX must be registered. If you selected this function in the setup program of DaVinci, this has been done by the setup program, otherwise, please repeat the installation process.

Adding DavCtl control into the tools list

BASIC 4.0 Visual

BASIC 4.0 + 5.0 Visual

Incorporate DavCtl control into your form

By default Visual Basic uses the name DavCtl1 for the newly created object.

Load an image File into the DavCtl control

In order to load a file into the DavCtl element you call the method LoadFromFile.. Specify a file name or an empty string to automatically dsplay a file selection dialog.
Private Sub mnuFileOpen_Click()
   DavCtl1.LoadFromFile ("")
End Sub

See also

Reference of the TDavinci characteristics and of methods

ActiveX introduction