Do you own a Debenu Quick PDF Library 12/11/10/9/8/7? Upgrade to Debenu Quick PDF Library 13!

Foxit Quick PDF Library

Frequently Asked Question:

Return to FAQ Index

Can I use Quick PDF Library with VB6?

Question

I want to use Quick PDF Library with VB6, is this possible?

Answer

Yes, Quick PDF Library is compatible with VB6. You can use the ActiveX edition of the SDK to create your applications in VB6. I've included some basic instructions and sample code for this below.

To use Quick PDF Library with VB6, simply register the ActiveX edition of the library and then add a reference to it within Visual Studio 6. Once this has been done draw a button on your form and add the below code to it.

Private Sub btnHelloWorld_Click()

Dim ClassName
Dim LicenseKey
Dim FileName

ClassName = "QuickPDFAX0717.PDFLibrary"
LicenseKey = "...SET YOUR LICENSE KEY HERE..."
FileName = "C:\Hello-World-From-QPL.pdf"

Dim QP
Dim Result

Set QP = CreateObject(ClassName)
Result = QP.UnlockKey(LicenseKey)

If Result = 1 Then

    MsgBox "Library version: " + QP.LibraryVersion
    MsgBox (QP.LicenseInfo)

    Call QP.DrawText(100, 500, "Hello world from Visual Basic 6")

    If QP.SaveToFile(FileName) = 1 Then
        MsgBox "File " + FileName + " written successfully."

    Else
       MsgBox "Error, file could not be written."
    End If
Else
    MsgBox "Invalid license key. Please set your license key by editing this file."
End If
End Sub

© 2015 Debenu & Foxit. All rights reserved. AboutBuyContactBlogNewsletterSupportFAQProduct UpdatesForum