Viscomsoft .NET PDF Viewer SDK

VB6 Developer Getting Started



1. Make sure your computer installed .NET runtime and call RegAsm.exe Viscomsoft.PDFViewer.dll /codebase /tlb and RegAsm.exe Viscomsoft.PDFViewerControl.dll /codebase /tlb in your computer. If you installed our trial version installer. It will call RegAsm.exe to register Viscomsoft.PDFViewer.dll and Viscomsoft.PDFViewerControl.dll  files automatically.

2. Launch Visual Basic 6.0. Select  New Project, Select  Standard EXE.



 

3. Select Project - References... , Select Viscomsoft_PDFViewer and Viscomsoft_PDFViewerControl


 


4. At the top of the Form1 (Code), add the following code statements to the top of the page
 

Public pdfviewer As VBControlExtender
 

5.  In form designer, resize the form using the mouse, let the form larger than default size.



6.  In form load event, add the following code:

Set pdfviewer = Controls.Add("Viscomsoft.PDFViewerControl.PDFControl", "pdfviewer", Me)


5.  In form resize event, add the following code:

If Not pdfviewer Is Nothing Then
 pdfviewer.Left = 0
 pdfviewer.Top = 0
 pdfviewer.Width = Me.Width - 250
 pdfviewer.Height = Me.Height
 pdfviewer.Visible = True
 pdfviewer.object.Resize
End If

6.  In form load event, add the following code to loading the PDF file:

Dim doc1 As New PDFDocument
doc1.Open "c:\yourfile.pdf"

pdfviewer.object.PDFView.Document = doc1
pdfviewer.object.PDFView.gotoPage 1

7.  Press F5 to Run the project , now it can loading and display the PDF document.