locked
open pdf file RRS feed

  • Question

  • I use this code

    Private Sub PDFGuideToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles PDFGuideToolStripMenuItem.Click
            System.Diagnostics.Process.Start("D:\test.pdf")
        End Sub

    what code i use that my application pick test.pdf file from application directory.
    Saturday, January 23, 2010 5:55 PM

Answers

  • Right click your app name in Solution Explorer

    Select Add Existing Item

    Find your text file on your hard drive, or wherever it is, and click on it

    Change the Copy To Output Directory property of the PDF File to Copy If Newer.


    Process.Start(Application.StartupPath & "\Test.pdf")
    
    Saturday, January 23, 2010 6:15 PM
  • try this Process.Start(Application.StartupPath & "\test.pdf")

    kaymaf

    If that what you want, take it. If not, ignored it and no complain

    CODE CONVERTER SITE : http://www.carlosag.net/Tools/CodeTranslator/.

    Saturday, January 23, 2010 6:15 PM

All replies

  • I use this code

    Private Sub PDFGuideToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles PDFGuideToolStripMenuItem.Click
            System.Diagnostics.Process.Start("D:\test.pdf")
        End Sub

    what code i use that my application pick test.pdf file from application directory.
    you are not the first one asking have a look here please:


    Just Be Humble Malange!
    Saturday, January 23, 2010 5:58 PM
  • I use this code

    Private Sub PDFGuideToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles PDFGuideToolStripMenuItem.Click
            System.Diagnostics.Process.Start("D:\test.pdf")
        End Sub

    what code i use that my application pick test.pdf file from application directory.
    you are not the first one asking have a look here please:


    Just Be Humble Malange!

    My application open test.pdf sucessfully.but i dont wanna give path like C:\ or D:\ .
    I need to put something that pick pdf file from application directory.

    Saturday, January 23, 2010 6:02 PM
  • Right click your app name in Solution Explorer

    Select Add Existing Item

    Find your text file on your hard drive, or wherever it is, and click on it

    Change the Copy To Output Directory property of the PDF File to Copy If Newer.


    Process.Start(Application.StartupPath & "\Test.pdf")
    
    Saturday, January 23, 2010 6:15 PM
  • try this Process.Start(Application.StartupPath & "\test.pdf")

    kaymaf

    If that what you want, take it. If not, ignored it and no complain

    CODE CONVERTER SITE : http://www.carlosag.net/Tools/CodeTranslator/.

    Saturday, January 23, 2010 6:15 PM