How to Open the Pdf file?

1. Right click on any of the tabs in your toolbox and click choose items.(Just make sure you have a version of adobe reader installed before starting.) When the dialog box pops up click the 'com components' tab then pick tha 'adobe pdf reader' com component.

    Click ok and you should now see a 'adobe pdf reader' control in your toolbox. Click this and drag it to your vb form.(you may need to resize it, usually appears very small).

   Now in order to read any pdf just alter the 'src' property of the control either in code or in the designer. when you run the program you should be able to view the pdf doc in the vb form with most of the options you get in adobe reader. Here is how you would alter the 'src' property in code. 

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



AdobeReader.src = "C:\mydoc.pdf"



End Sub



2. System.Diagnostics.Process.Start("D:\test.pdf")

3. You can also use a webbrowser control...add it to your form and then use the Navigate method...

WebBrowser1.Navigate("D:\test.pdf")

 




 

 

 

 

你可能感兴趣的:(File)