我正在使用 axAcroPDF 在我的 win 表单应用程序中查看 PDF 文件。每当我尝试运行该应用程序时,我都会收到一个空消息框,如下图所示。
有谁知道为什么?要加载 PDF 文件,我将此代码添加到按钮
OpenFileDialog dialog = new OpenFileDialog();
dialog.Filter = "PDF files (*.PDF)|*.PDF|All files (*.*)|*.*";
dialog.InitialDirectory = "C:";
dialog.Title = "Select a PDF file";
if (dialog.ShowDialog() == DialogResult.OK)
{
this.Controls.Add(this.axAcroPDF1);
axAcroPDF1.src = dialog.FileName;
filname1 = dialog.FileName;
button2.Enabled = true;
图片: