vb如何调用PDF文件
vb如何调用PDF文件,并且可以关闭
[解决办法]
有,先安装Acrobat Reader 7.0,添加COM组件Adobe Acrobat 7.0 browser document,就会在工具箱里出现控件了,载入文件的语句我是这样写的,当然,要加个对话框:我用的是.NET,语法和对话框可能有点不同:
Private Sub mnuOpen_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles mnuOpen.Click
Dim OpenFileName As String
OpenFileDialog1.FileName = " "
OpenFileDialog1.Filter = "Adobe PDF 文件 (*.pdf)|*.pdf "
If OpenFileDialog1.ShowDialog() = Windows.Forms.DialogResult.OK Then
OpenFileName = OpenFileDialog1.FileName
AxAcroPDF1.LoadFile(OpenFileName)
AxAcroPDF1.Visible = True
Me.Text = "Adobe Reader - [ " + GetFileName(OpenFileName) + "] "
Timer1.Enabled = True
mnuAutoTrnovr.Enabled = True
End If
End Sub
[解决办法]
起动word、excel、AutoCad基本都需要以下几个关键语句
Dim wdApp As Word.Application
Dim aDoc As Document
Set wdApp = New Word.Application
Word.Application Excel.Application Acad.Application
你没有定义,能起来吧,我要试一下