How to create a .NET PDF Viewer In 5 Minutes<BR><BR>Here are the steps.<BR><BR>1. Start Visual Studio 2005 and create a Visual C# Windows Application.<BR>2. Add a reference to our new PDFOne .NET v2.0 Preview component (Gnostice.PDFOne.dll)<BR>3. Resize Form1 to your liking.<BR>4. Add a Toolstrip component (named as toolStrip1 in the code snippets below) from the toolbox and add the following controls in the listed order on the strip: <BR> 4a. TextBox - 1 No. (tb_Filename)<BR> 4b. Button - 1 No. <BR> 4c. Label - 4 Nos.<BR>5. Resize the text box so that it looks like the address bar of a browser.<BR>6. Set an icon image for the button.<BR>7. Change the Text property of the labels to First Page, Previous Page, Next Page, and Last Page.<BR>8. Double click Form1 to go to Code View. Extend the Form1 class by adding private members of type PDFDocument and PDFViewer, and modifying the default constructor to instantiate the private members.<BR>public partial class Form1 : Form<BR>{<BR> // New private members<BR> PDFDocument doc1;<BR> PDFViewer viewer1;<BR><BR> public Form1()<BR> {<BR> InitializeComponent();<BR> // Initialize the private members<BR> doc1 = new PDFDocument();<BR> viewer1 = new PDFViewer(); <BR> }<BR><BR> <BR>9. Add the following code for the button click event <BR>if (tb_Filename.Text == "") <BR>{<BR> return;<BR>}<BR><BR>// Close previous document if any<BR>if (doc1.GetPageCount() > 0)<BR>{<BR> doc1.Close();<BR> doc1.Dispose(); <BR>}<BR><BR>// Load PDF document<BR>try<BR>{<BR> doc1.Load(tb_Filename.Text);<BR>}<BR>catch(Exception err1)<BR>{ <BR> MessageBox.Show(<BR> "Sorry. There has been an error. Error Information: " <BR> + err1.Message);<BR> return; <BR>} <BR><BR>// Add viewer to Form1<BR>this.Controls.Add(viewer1);<BR><BR>// Position the viewer just below the toolstrip<BR>viewer1.Location = new System.Drawing.Point(<BR> this.toolStrip1.Location.X, <BR> this.tool