Herd Software Development
DaVinci Graphics Library
DaVinci Documentation
Tutorial for Visual Basic 4/5/6
OCX or DLL
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
-
Menu item "Extras | supplementary control elements" select (hotkey Ctrl-N)
-
In the list the control "DavCtl: Mark Control"DaVinci 3 with a cross
-
OK press
BASIC 4.0 + 5.0 Visual
-
Menu item "Projekt | Komponenten" select (hotkey Ctrl-T)
-
In the list the control "DavCtl: Mark Control"DaVinci 3 with a cross
-
OK press
Incorporate DavCtl control into your form
-
Select the DavCtl ActiveX-Control (symbol: ) from the instrument pallet from.
-
Drag a frame in 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