afsalks013 ks

afsalks013 ks

  • NA
  • 22
  • 1.5k

Visual Studio Pdf Viewer Show Error Any Solution

Oct 11 2019 5:02 AM
 after publish windows application When am click button 2 error showing
 
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
{
OpenFileDialog dlg = new OpenFileDialog();
// set file filter of dialog
dlg.Filter = "pdf files (*.pdf) |*.pdf;";
dlg.ShowDialog();
if (dlg.FileName != null)
{
// use the LoadFile(ByVal fileName As String) function for open the pdf in control
axAcroPDF1.LoadFile(dlg.FileName);
}
}
}

Answers (2)