ActiveX - Registry Use


By default, when Daisy is run as an ActiveX Component, it uses the same place in the Windows registry as does a standalone version of the program.

This means that default settings when the program is run as an ActiveX Component, are the same as those when the program was last run in standalone.


This may not always be acceptable, as you may have several applications running on the same computer at the same time.

To get round this problem, you can use RegistryApplication to set the application to be used.

The following snippet of code sets up the registry.

  Dim wrkError As String
  ...
  Set Daisy = New DaisyLite2001
  Daisy.RegistryApplication = "Widgets"
  If (Daisy.Initialise("VagueShot", "1023...", "1823...", _
          wrkError) = False) Then
      Daisy.MessageError wrkError
      Set Daisy = Nothing
      Exit Sub
  End If
  ...
  Daisy.ShowDaisy

Note :-

  1. RegistryApplication must always be the first property set after the 'Daisy' object has been created.

  2. Note that when you choose an application, make sure it doesn't clash with anybody else!

  3. 'Widgets' would not be a good choice, but 'DaisyWidgets03' would be much better.

    'Daisy' links it to Daisy, 'Widgets' to Widgets and '03' to the year the program was created.

  4. Initialise must be called with the user and registration codes. This is because the RegistryApplication does not contain registration details for Daisy.

    Use your correct codes! Not the ones in the snippet.


Normally, when running as an ActiveX, the registry is not updated, when that copy of Daisy is shutdown.

However, if the program is using a user-defined RegistryApplication and the RegistrySave property has been set to 'True', then values will be saved in the Windows registry.


ActiveX   Daisy   Index