ActiveX - Creating the Daisy Object


Creating a program with a valid 'Daisy' object is not a difficult process, but it is recommended that you read one of the many books on ActiveX programming first?

The code shown here was programmed in Visual Basic 6.0 except where noted.

You must also have installed and registered Daisy on your computer.


The first thing that must be done is to add a reference to the Daisy ActiveX Component, 'Daisy Lite 2003 X', into your Visual Basic project, which is the name of the Daisy ActiveX component.

Adding a Reference to a Project

Note that the location shown for the program will vary according to where you have installed Daisy.

Similar techniques can be used in other versions of Visual Basic such as 4.0.


A declaration must then be placed in the code to define a 'Daisy' object.

  Private WithEvents Daisy As DaisyLite2003

It is also a good idea to destroy the 'Daisy' object on closing the program or the form on which it is loaded. This should be done to try to minimise resource leaks.

The code shown could be used in the Form_Unload routine in a Form.

  Private Sub Form_Unload(Cancel As Integer)
      On Error Resume Next
      Set Daisy = Nothing
  End Sub


The 'Daisy' object also has to be initialised, before it can be used in programming.

    Set Daisy = New DaisyLite2003
  Daisy.ProgramName = "Daisy Test Program"
  ...

Note :-

  1. The Set statement is used to create a new copy of the object.

  2. ProgramName is used to set the name of the program.

  3. This code snippet does not actually show Daisy 2001. The ShowDaisy method must be used to do this.


If you want to run this code in Visual Basic 4.0, you can't use the WithEvents in the declaration. Otherwise, there is no problem.


ActiveX   Daisy   Index