How to reference pdf file in Resources?
How to reference pdf file in Resources?
How to reference pdf file in Resources?
How to reference pdf file in Resources?
How to reference pdf file in Resources?
How to reference pdf file in Resources? How to reference pdf file in Resources? How to reference pdf file in Resources? How to reference pdf file in Resources? How to reference pdf file in Resources? How to reference pdf file in Resources? How to reference pdf file in Resources? How to reference pdf file in Resources?
How to reference pdf file in Resources? How to reference pdf file in Resources?
How to reference pdf file in Resources?
Go Back  Xtreme Visual Basic Talk > > > How to reference pdf file in Resources?


Reply
 
Thread Tools Display Modes
  #1  
Old 03-25-2010, 05:27 PM
YYP YYP is offline
Newcomer
 
Join Date: Nov 2009
Posts: 11
Default How to reference pdf file in Resources?


What I want to do is include the manual pdf file in the application, which can be opend from toolstrip menu on the main form.

I added the pdf file to Resources folder (is this right way to do it?) but how can I reference the filepath so that I can execute it using shell??
Obviously,
Code:
 Dim Initialpath As String = Application.StartupPath
        Dim filepath As String = Initialpath & "\Resources\AxCManual.pdf"
        MsgBox(Initialpath & "," & filepath)
        Shell(filepath)
is not the way to do it....

Thank you in advance for any help.

Last edited by YYP; 03-25-2010 at 06:05 PM.
Reply With Quote
  #2  
Old 03-27-2010, 09:41 AM
YYP YYP is offline
Newcomer
 
Join Date: Nov 2009
Posts: 11
Default

I managed to do it by myself.
Just for your reference...

Quote:
Public Sub OpenManual()
Dim directory As String = CurDir()
Dim filename As String = "AxCManual.pdf"
Dim fullpath As String = My.Computer.FileSystem.CombinePath(directory, filename)
Dim oProcInfo As New ProcessStartInfo
Dim oProc As New Process
Dim PageList As New ArrayList

Try
With oProcInfo
.FileName = fullpath
.CreateNoWindow = False
.WindowStyle = ProcessWindowStyle.Maximized
End With

oProc.StartInfo = oProcInfo

If oProc.Start() = True Then
'Wait till user exit from Adobe Acrobat Reader
oProc.WaitForExit()
Else
MessageBox.Show("Application activation failed", "Error", _
MessageBoxButtons.OK)
End If
Catch ex As System.InvalidOperationException
MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK)
End Try
End Sub
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Advertisement:





Free Publications
The ASP.NET 2.0 Anthology
101 Essential Tips, Tricks & Hacks - Free 156 Page Preview. Learn the most practical features and best approaches for ASP.NET.
subscribe
Programmers Heaven C# School Book -Free 338 Page eBook
The Programmers Heaven C# School book covers the .NET framework and the C# language.
subscribe
Build Your Own ASP.NET 3.5 Web Site Using C# & VB, 3rd Edition - Free 219 Page Preview!
This comprehensive step-by-step guide will help get your database-driven ASP.NET web site up and running in no time..
subscribe
How to reference pdf file in Resources?
How to reference pdf file in Resources?
How to reference pdf file in Resources? How to reference pdf file in Resources?
How to reference pdf file in Resources?
How to reference pdf file in Resources?
How to reference pdf file in Resources? How to reference pdf file in Resources? How to reference pdf file in Resources? How to reference pdf file in Resources? How to reference pdf file in Resources? How to reference pdf file in Resources? How to reference pdf file in Resources?
How to reference pdf file in Resources?
How to reference pdf file in Resources?
 
How to reference pdf file in Resources?
How to reference pdf file in Resources?
 
-->