Previous...
Next..
Here i will explain How to Open and show a PDF file inside the form in window application.
Step(1): Form
Drag and down a button and "PDF Tool" from toolBox. If i "PDF tool" is not showing in your tool box then right click on your toolbox and choose item and click on "COM Component" and then select "Adob PDF " Then it will show you on your tool box and then drag and down this.
Double click on button and write this code.
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.Data.SqlClient;
using System.Text;
using System.IO;
using System.IO;
namespace First_Csharp_app
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void Choose_Btn_click(object sender, EventArgs e)
{
OpenFileDialog openfile = new OpenFileDialog ();
if(openfile .ShowDialog() ==System.Window.Forms.DialogResult.OK)
{
{
OpenFileDialog openfile = new OpenFileDialog ();
if(openfile .ShowDialog() ==System.Window.Forms.DialogResult.OK)
{
axAcroPDF1.src = openfile .FileName;
}
}
}
Now Run your application
Previous...
Next..
No comments:
Post a Comment