VB6

<< Click to Display Table of Contents >>

Navigation:  Installation >

VB6

We have included a new version of the OCX Interface ViewPDF03.ocx to work in legacy VB6 applications. (ViewPDF03.ocx can also be used with WPViewPDF V4 and V5!)

It makes use of the new methods included in WPViewPDF V3 and V4. Please do NOT use the OCX in .NET Applications.

 

If you do not need a PDF viewer but only the merge or print functionality it is better to access the DLL directly. You can import the required functions and access them without having to deal with the OCX interface.

 

To install it in VB6 please drag the OCX from the explorer to the tool palette.

 

Please make sure the engine DLL has been copied to your application directory.

 

The WPViewPDF setup also creates a registry entry with the installation directory path. This makes sure the ViewPDF engine can be loaded when the IDE is open. The OCX does not work if it cannot load the PDF engine.

 

You can use this code in Form_Load() to load the DLL and set the license information

 DLLNAME = "{hkcu}Software\WPCubed\WPViewPDF\Path"

 LICNAME = "" 'license info

 LICKEY = "" 'license info

 LICCODE = 0 'license info

 WPViewPDFX1.ViewerStart DLLNAME, LICNAME, LICKEY, LICCODE

 

 

If you use multiple controls please use ViewerStart with each of the controls. It is necessary that the DLL path is the same in all this function calls.