Sie sind auf Seite 1von 3

Make a pdf reader

Requirements: A Form, a button and a PDF reader:

To add a pdf reader to the form:

On the Toolbox: right click the mouse and click on Choose Items...:

A Window will appear: Click on COM Components tab.

Scroll down to Adobe PDF Reader and check it then click ok.
Then click ok.

This will add Adobe PDF Reader control to the control box:

Then drag Adobe PDF Reader to the form:


Then add OpenFileDialog to the form.

Change OpenFileDialog Filter property to: PDF Files (*.pdf)|

(Don’t change anything in this openfiledialog) except for filter in property

Add new Open button and Cancel Button.

Double click on Open button and add the following highlighted code:
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.
EventArgs) Handles Button1.Click

OpenFileDialog1.ShowDialog()

AxAcroPDF1.src = OpenFileDialog1.FileName

End Sub

Double click on cancel button and add the following highlighted code:
Private Sub cmdCancel_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles cmdCancel.Click
End
End Sub

Das könnte Ihnen auch gefallen