Imports System.IO

Public Class frmMain
    Inherits System.Windows.Forms.Form

#Region " Windows Form Designer generated code "

    Public Sub New()
        MyBase.New()

        'This call is required by the Windows Form Designer.
        InitializeComponent()

        'Add any initialization after the InitializeComponent() call

    End Sub

    'Form overrides dispose to clean up the component list.
    Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean)
        If disposing Then
            If Not (components Is Nothing) Then
                components.Dispose()
            End If
        End If
        MyBase.Dispose(disposing)
    End Sub

    'Required by the Windows Form Designer
    Private components As System.ComponentModel.IContainer

    'NOTE: The following procedure is required by the Windows Form Designer
    'It can be modified using the Windows Form Designer.  
    'Do not modify it using the code editor.
    Friend WithEvents PdfViewer1 As JaervPdfViewerNET.PdfViewer
    <System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()
        Me.PdfViewer1 = New JaervPdfViewerNET.PdfViewer
        Me.SuspendLayout()
        '
        'PdfViewer1
        '
        Me.PdfViewer1.Location = New System.Drawing.Point(120, 128)
        Me.PdfViewer1.Name = "PdfViewer1"
        Me.PdfViewer1.Size = New System.Drawing.Size(304, 224)
        Me.PdfViewer1.TabIndex = 0
        '
        'frmMain
        '
        Me.AutoScaleBaseSize = New System.Drawing.Size(5, 13)
        Me.ClientSize = New System.Drawing.Size(544, 469)
        Me.Controls.Add(Me.PdfViewer1)
        Me.Name = "frmMain"
        Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen
        Me.Text = "SampleApp"
        Me.ResumeLayout(False)

    End Sub

#End Region

    Private Sub frmMain_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

        PdfViewer1.Dock = DockStyle.Fill

        PdfViewer1.SetLicense("<Your email>", "<Your licensekey>")

        Dim docPath As String = Path.Combine(Path.GetDirectoryName(Application.ExecutablePath), "..\Documentation.pdf")

        PdfViewer1.OpenPDF(docPath)

    End Sub

End Class
