zoukankan      html  css  js  c++  java
  • 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")




     

  • 相关阅读:
    论文笔记4
    论文笔记3
    论文笔记2
    论文笔记1
    论文笔记
    AFG与AWG的比较
    Linux下“有线线缆被拔出”问题的解决
    python生成excel格式座位表
    PythonTip--一马当先--bfs
    python pygame--倒计时
  • 原文地址:https://www.cnblogs.com/gzh4455/p/2207949.html
Copyright © 2011-2022 走看看