Back to product page

Getting Started in VB


Working with the COM object

In order to insert the wodCrypt COM object into your project, follow these steps:
  1. Install the component on your system by starting its setup program.
  2. In the Visual Basic IDE, create a new project or open an existing one.
  3. Click on 'Project', then on the 'References' menu
  4. Find and select 'WeOnlyDo! COM Crypt Component', and click on 'Ok' to leave the dialog box.
  5. Open the code editor and at the top in the (General) section add this code:
     
       Dim WithEvents Crypt1 As wodCryptCom
     

  6. In Form_Load function initialize the component:
     
       Private Sub Form_Load()
        Set Crypt1 = New wodCryptCom
       End Sub
     

  7. If you have the licensed version of wodCrypt, then after you initialize the component, set its LicenseKey property:
     
       Private Sub Form_Load()
        Set Crypt1 = New wodCryptCom
        Crypt1.LicenseKey = "xxxx....xxxx"
       End Sub
     

  8. To free up resources when your program ends, destroy the component from the Form_Unload event:
     
       Private Sub Form_Unload(Cancel As Integer)
        Set Crypt1 = Nothing
       End Sub
     

  9. Do not forget to distribute wodCrypt.DLL when using the COM object!

Working with the ActiveX control

In order to insert the wodCrypt ActiveX control into your project, follow these steps:
  1. Install the component on your system by starting its setup program.
  2. In the Visual Basic IDE, create a new project or open an existing one.
  3. Click on 'Project', then on the 'Components' menu
  4. Find and select 'WeOnlyDo! COM Crypt ActiveX Control', and click on 'Ok' to leave the dialog box.
  5. Locate the new wodCrypt icon on the Toolbox toolbar
  6. Do not forget to distribute wodCrypt.OCX when using the ActiveX control!

Platforms

Windows