Does anyone know if I have a PDF in a vb form?
Type I did not want to open an adobe reader, foxit reader, or any other reader itself, wanted to open it by the same vb form.
Does anyone have an idea?
Does anyone know if I have a PDF in a vb form?
Type I did not want to open an adobe reader, foxit reader, or any other reader itself, wanted to open it by the same vb form.
Does anyone have an idea?
You can use Visual Studio 2010 to create a project with a form, import the libraries interop.acropdflib.dll and axinterop.acropdflib.dll
include in the form:
MenuStrip - Set menu: File and options: Open PDF Ctrl + O and Exit Alt + X OpenFileDialog - Dialog to select a file StatusStrip: Include 5 ToolStripStatusLabel with the following texts: test, |, date, |, hour Timer And the AcroPDFLib dlls;
Set the codes for the form
Public Class FormPDF
Private Sub OpenPDFFileToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)_
Handles OpenPDFFileToolStripMenuItem.Click OpenFileDialog1.ShowDialog () AxAcroPDF1.src = OpenFileDialog1.FileName tstpData.Text = Format (Now, "dd-MM-yyyy") tstpHora.Text = Now.ToLongTimeString.ToString () End Sub
Private Sub ExitToolStripMenuItem_Click(ByVal sender As System.Object,
ByVal e As System.EventArgs)_
Handles ExitToolStripMenuItem.Click
Application.Exit()
End Sub
Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Timer1.Tick
tstpData.Text = Format(Now, "dd-MM-yyyy")
tstpHora.Text = Now.ToLongTimeString.ToString()
End Sub
End Class