I have Visual Basic (Visual Studio Professional Edition, .NetFrameWork 4.0)
I want to include and Call PDF with my Button_Click_Event
I include MyPDF.pdf in
Firstly, press on the pdf file in the solutions explorer. Propeties of the file should be as following:
Build Action: Content
Copy to output directory: Copy always
The path to the file in users computer will be Application.StartupPath & "\Resources\MyPDF.pdf"
Not sure I did not forget something, so tell me if it works :)
EDIT: I see a lot of people are having trouble with this so here is the simplest way I know to deploy a file together with .net program in visual studio:
Build Action: Content;
Copy to output directory: Copy always
Application.StartupPath & "\filename.txt"