Print Preview ActiveX Active Users: 31 / Visits Today: 1299
Highest Active Users: 273
Print Preview ActiveX
Home | Profile | Register | Active Topics | Members | Search | FAQ | RSS
Save Password
Forgot your Password?

 All Forums
 Print Preview
 Help file
 Authorize - Function
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic: BackColor - Property Topic Next Topic: ArrayReport - Method  


327 Posts

Posted - 07/13/2005 :  14:30:13  Show Profile
Function Authorize


Allows the entry of authorisation details.


Authorize( strName As String, strLicenseKey As String ) As Boolean

Parameter       Description                                         
  • sName Registered user name
  • sLicenseKey License key which is send by email after registering

    The Authorize method must be called for each instance of Preview that an application creates. The PrintPreview library can be used without an authorization key but will show a 'nag' screen every time when activated.

    When PrintPreview is registered an e-mail is sent which contains the necessary license key.


    To authorize an instance of PrintPreview5:

    Set Preview = New PrintPreview5.Preview
    Preview.Authorize("John Smith", "1234-XXXX-1234-1234")
    How to activate:

    To add Print Preview to your Visual Basic project

    On the Project menu (or in the Visual Basic window of acces), click References to display the References dialog box.

    To add the Print Preview control to the toolbox, click the Browse button, and locate the file preview.dll, this is normally installed into C:\Program Files\Preview but depends on the options you have selected during installation. If you use XML format to save, you need to add the MSXML3 reference too.

    When you add the Print Preview ActiveX DLL to the list of available ActiveX, Visual Basic automatically selects its check box in the Components dialog box.

    To add Print Preview to your code:

    You need to define a variable using the WithEvents keyword and create an instance of the Preview control in the on_load event in the declarations section of all the forms in which you are intending to use the preview methods, properties etc., after doing so you can make a reference to it. The example below can be pasted straight into an empty form (don't forget to adjust the Authorise line).

    The preview control can not be made public.

    Option Explicit
    ' *** Declare the variable so that it can receive events
    Public WithEvents Preview As PrintPreview.Preview
    Private Sub Form_Load()
        ' *** Create an instance of the control  
        Set Preview = New PrintPreview5.Preview
        Preview.Authorize("Your Registered Name", "Your Email Received Licensekey")
        ' ***' optional statement if you want to show the About dialog 
    End Sub
    Come and visit :

    Edited by - emiel on 07/27/2005 13:15:12
    Go to Bottom of Page
      Previous Topic: BackColor - Property Topic Next Topic: ArrayReport - Method  
     New Topic  Topic Locked
     Printer Friendly
    Jump To:
    Print Preview ActiveX © Mandix Go To Top Of Page
    This page was generated in 0.06 seconds. Powered By: Snitz Forums 2000 Version 3.4.02