h1.post-title { color:orange; font-family:verdana,Arial; font-weight:bold; padding-bottom:5px; text-shadow:#64665b 0px 1px 1px; font-size:32px; } -->

Pages

AppNotifyIcon

InitializeComponent
namespace TestEasyCon
{
    partial class AppNotifyIcon
    {
        /// <summary>
        /// Required designer variable.
        /// </summary>
        private System.ComponentModel.IContainer components = null;

        /// <summary>
        /// Clean up any resources being used.
        /// </summary>
        /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
        protected override void Dispose(bool disposing)
        {
            if (disposing && (components != null))
            {
                components.Dispose();
            }
            base.Dispose(disposing);
        }

        #region Component Designer generated code

        /// <summary>
        /// Required method for Designer support - do not modify
        /// the contents of this method with the code editor.
        /// </summary>
        private void InitializeComponent()
        {
            this.components = new System.ComponentModel.Container();
            System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(AppNotifyIcon));
            this.nfyIcon = new System.Windows.Forms.NotifyIcon(this.components);
            this.contextMenuStrip = new System.Windows.Forms.ContextMenuStrip(this.components);
            this.tsmRestore = new System.Windows.Forms.ToolStripMenuItem();
            this.tsmExit = new System.Windows.Forms.ToolStripMenuItem();
            this.tmrForNfy = new System.Windows.Forms.Timer(this.components);
            this.contextMenuStrip.SuspendLayout();
            this.SuspendLayout();
            //
            // nfyIcon
            //
            this.nfyIcon.ContextMenuStrip = this.contextMenuStrip;
            this.nfyIcon.Icon = ((System.Drawing.Icon)(resources.GetObject("nfyIcon.Icon")));
            this.nfyIcon.Text = "EasyCon";
            this.nfyIcon.Visible = true;
            this.nfyIcon.BalloonTipShown += new System.EventHandler(this.notifyIcon1_BalloonTipShown);
            //
            // contextMenuStrip
            //
            this.contextMenuStrip.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
            this.tsmRestore,
            this.tsmExit});
            this.contextMenuStrip.Name = "contextMenuStrip1";
            this.contextMenuStrip.Size = new System.Drawing.Size(124, 48);
            //
            // tsmRestore
            //
            this.tsmRestore.Name = "tsmRestore";
            this.tsmRestore.Size = new System.Drawing.Size(123, 22);
            this.tsmRestore.Text = "Restore";
            //
            // tsmExit
            //
            this.tsmExit.Name = "tsmExit";
            this.tsmExit.Size = new System.Drawing.Size(123, 22);
            this.tsmExit.Text = "Exit";
            //
            // tmrForNfy
            //
            this.tmrForNfy.Tick += new System.EventHandler(this.tmrForNfy_Tick);
            //
            // AppNotifyIcon
            //
            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
            this.Name = "AppNotifyIcon";
            this.Size = new System.Drawing.Size(10, 10);
            this.contextMenuStrip.ResumeLayout(false);
            this.ResumeLayout(false);

        }

        #endregion

        private System.Windows.Forms.NotifyIcon nfyIcon;
        private System.Windows.Forms.ContextMenuStrip contextMenuStrip;
        private System.Windows.Forms.ToolStripMenuItem tsmRestore;
        private System.Windows.Forms.ToolStripMenuItem tsmExit;
        private System.Windows.Forms.Timer tmrForNfy;
    }
}

Code Behind

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace TestEasyCon
{
    public partial class AppNotifyIcon : UserControl
    {
        public AppNotifyIcon()
        {
            InitializeComponent();
            nfyIcon.DoubleClick += new EventHandler(OpenApp);
            tsmRestore.Click += new EventHandler(OpenApp);
        }


        #region Declaration
        bool FromTrayIconDoubleClick = false;
        public delegate void RestoreClickedEventHandler(object sender, EventArgs e);
        public event RestoreClickedEventHandler RestoreClicked;
        #endregion


        #region Functions
        private void OpenApp(object sender, EventArgs e)
        {
            if (RestoreClicked != null)
                RestoreClicked(this, e);
        }
        /// <summary>
        ///  To Restore Application
        /// </summary>
        /// <param name="frm">Pass Form Name</param>
        public  void RestoreApplicaiton(Form frm)
        {
            FromTrayIconDoubleClick = true;
            frm.Show();
            frm.WindowState = FormWindowState.Normal;
            frm.Focus();
        }

        #endregion

        private void notifyIcon1_BalloonTipShown(object sender, EventArgs e)
        {
            tmrForNfy.Enabled = true;
        }

        private void tmrForNfy_Tick(object sender, EventArgs e)
        {
            nfyIcon.Visible = false;
            nfyIcon.Visible = true;
            tmrForNfy.Enabled = false;
        }    
    }
}

ImageViewer in C#.Net

InitializeComponent
namespace TestEasyCon
{
    partial class ImageViewer
    {
        /// <summary>
        /// Required designer variable.
        /// </summary>
        private System.ComponentModel.IContainer components = null;

        /// <summary>
        /// Clean up any resources being used.
        /// </summary>
        /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
        protected override void Dispose(bool disposing)
        {
            if (disposing && (components != null))
            {
                components.Dispose();
            }
            base.Dispose(disposing);
        }

        #region Component Designer generated code

        /// <summary>
        /// Required method for Designer support - do not modify
        /// the contents of this method with the code editor.
        /// </summary>
        private void InitializeComponent()
        {
            System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(ImageViewer));
            this.panel1 = new System.Windows.Forms.Panel();
            this.imageBox1 = new Cyotek.Windows.Forms.ImageBox();
            this.menuStrip1 = new System.Windows.Forms.MenuStrip();
            this.tsmClose = new System.Windows.Forms.ToolStripMenuItem();
            this.tsmTools = new System.Windows.Forms.ToolStripMenuItem();
            this.tsmFit = new System.Windows.Forms.ToolStripMenuItem();
            this.tsmTZoomIn = new System.Windows.Forms.ToolStripMenuItem();
            this.tsmTZoomOut = new System.Windows.Forms.ToolStripMenuItem();
            this.tsmTRotateClockWise = new System.Windows.Forms.ToolStripMenuItem();
            this.tsmTRotateAntiClockWise = new System.Windows.Forms.ToolStripMenuItem();
            this.tsmNormal = new System.Windows.Forms.ToolStripMenuItem();
            this.tsmZoomIn = new System.Windows.Forms.ToolStripMenuItem();
            this.tsmZoomOut = new System.Windows.Forms.ToolStripMenuItem();
            this.tsmRotateclockWise = new System.Windows.Forms.ToolStripMenuItem();
            this.tsmRotateAntiClockWise = new System.Windows.Forms.ToolStripMenuItem();
            this.tsmPrint = new System.Windows.Forms.ToolStripMenuItem();
            this.tsmZoom = new System.Windows.Forms.ToolStripMenuItem();
            this.tsmZoomSize = new System.Windows.Forms.ToolStripComboBox();
            this.tsmExit = new System.Windows.Forms.ToolStripMenuItem();
            this.panel1.SuspendLayout();
            this.menuStrip1.SuspendLayout();
            this.SuspendLayout();
            //
            // panel1
            //
            this.panel1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
                        | System.Windows.Forms.AnchorStyles.Left)
                        | System.Windows.Forms.AnchorStyles.Right)));
            this.panel1.Controls.Add(this.imageBox1);
            this.panel1.Controls.Add(this.menuStrip1);
            this.panel1.Location = new System.Drawing.Point(0, 0);
            this.panel1.Name = "panel1";
            this.panel1.Size = new System.Drawing.Size(632, 752);
            this.panel1.TabIndex = 0;
            //
            // imageBox1
            //
            this.imageBox1.AutoSize = false;
            this.imageBox1.Dock = System.Windows.Forms.DockStyle.Fill;
            this.imageBox1.Location = new System.Drawing.Point(0, 25);
            this.imageBox1.Name = "imageBox1";
            this.imageBox1.Size = new System.Drawing.Size(632, 727);
            this.imageBox1.TabIndex = 1;
            //
            // menuStrip1
            //
            this.menuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
            this.tsmClose,
            this.tsmTools,
            this.tsmNormal,
            this.tsmZoomIn,
            this.tsmZoomOut,
            this.tsmRotateclockWise,
            this.tsmRotateAntiClockWise,
            this.tsmPrint,
            this.tsmZoom,
            this.tsmZoomSize,
            this.tsmExit});
            this.menuStrip1.Location = new System.Drawing.Point(0, 0);
            this.menuStrip1.Name = "menuStrip1";
            this.menuStrip1.Size = new System.Drawing.Size(632, 25);
            this.menuStrip1.TabIndex = 0;
            this.menuStrip1.Text = "menuStrip1";
            //
            // tsmClose
            //
            this.tsmClose.AutoToolTip = true;
            this.tsmClose.Image = ((System.Drawing.Image)(resources.GetObject("tsmClose.Image")));
            this.tsmClose.Name = "tsmClose";
            this.tsmClose.Size = new System.Drawing.Size(61, 21);
            this.tsmClose.Text = "Close";
            this.tsmClose.ToolTipText = "Close ";
            //
            // tsmTools
            //
            this.tsmTools.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
            this.tsmFit,
            this.tsmTZoomIn,
            this.tsmTZoomOut,
            this.tsmTRotateClockWise,
            this.tsmTRotateAntiClockWise});
            this.tsmTools.Image = ((System.Drawing.Image)(resources.GetObject("tsmTools.Image")));
            this.tsmTools.Name = "tsmTools";
            this.tsmTools.Size = new System.Drawing.Size(60, 21);
            this.tsmTools.Text = "Tools";
            //
            // tsmFit
            //
            this.tsmFit.AutoToolTip = true;
            this.tsmFit.Image = ((System.Drawing.Image)(resources.GetObject("tsmFit.Image")));
            this.tsmFit.Name = "tsmFit";
            this.tsmFit.Size = new System.Drawing.Size(194, 22);
            this.tsmFit.Text = "Fit";
            this.tsmFit.ToolTipText = "Fit";
         
            //
            // tsmTZoomIn
            //
            this.tsmTZoomIn.Image = ((System.Drawing.Image)(resources.GetObject("tsmTZoomIn.Image")));
            this.tsmTZoomIn.Name = "tsmTZoomIn";
            this.tsmTZoomIn.Size = new System.Drawing.Size(194, 22);
            this.tsmTZoomIn.Text = "Zoom In";
         
            //
            // tsmTZoomOut
            //
            this.tsmTZoomOut.AutoToolTip = true;
            this.tsmTZoomOut.Image = ((System.Drawing.Image)(resources.GetObject("tsmTZoomOut.Image")));
            this.tsmTZoomOut.Name = "tsmTZoomOut";
            this.tsmTZoomOut.Size = new System.Drawing.Size(194, 22);
            this.tsmTZoomOut.Text = "Zoom Out";
         
            //
            // tsmTRotateClockWise
            //
            this.tsmTRotateClockWise.AutoToolTip = true;
            this.tsmTRotateClockWise.Image = ((System.Drawing.Image)(resources.GetObject("tsmTRotateClockWise.Image")));
            this.tsmTRotateClockWise.Name = "tsmTRotateClockWise";
            this.tsmTRotateClockWise.Size = new System.Drawing.Size(194, 22);
            this.tsmTRotateClockWise.Text = "Rotate Clock Wise";
         
            //
            // tsmTRotateAntiClockWise
            //
            this.tsmTRotateAntiClockWise.AutoToolTip = true;
            this.tsmTRotateAntiClockWise.Image = ((System.Drawing.Image)(resources.GetObject("tsmTRotateAntiClockWise.Image")));
            this.tsmTRotateAntiClockWise.Name = "tsmTRotateAntiClockWise";
            this.tsmTRotateAntiClockWise.Size = new System.Drawing.Size(194, 22);
            this.tsmTRotateAntiClockWise.Text = "Rotate Anti Clock Wise";
         
            //
            // tsmNormal
            //
            this.tsmNormal.AutoToolTip = true;
            this.tsmNormal.Image = ((System.Drawing.Image)(resources.GetObject("tsmNormal.Image")));
            this.tsmNormal.Name = "tsmNormal";
            this.tsmNormal.Size = new System.Drawing.Size(28, 21);
            this.tsmNormal.ToolTipText = "Fit";
            //
            // tsmZoomIn
            //
            this.tsmZoomIn.AutoToolTip = true;
            this.tsmZoomIn.Image = ((System.Drawing.Image)(resources.GetObject("tsmZoomIn.Image")));
            this.tsmZoomIn.Name = "tsmZoomIn";
            this.tsmZoomIn.Size = new System.Drawing.Size(28, 21);
            this.tsmZoomIn.ToolTipText = "Zoom In";
            //
            // tsmZoomOut
            //
            this.tsmZoomOut.AutoToolTip = true;
            this.tsmZoomOut.Image = ((System.Drawing.Image)(resources.GetObject("tsmZoomOut.Image")));
            this.tsmZoomOut.Name = "tsmZoomOut";
            this.tsmZoomOut.Size = new System.Drawing.Size(28, 21);
            this.tsmZoomOut.ToolTipText = "Zoom Out";
            //
            // tsmRotateclockWise
            //
            this.tsmRotateclockWise.AutoToolTip = true;
            this.tsmRotateclockWise.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
            this.tsmRotateclockWise.Image = ((System.Drawing.Image)(resources.GetObject("tsmRotateclockWise.Image")));
            this.tsmRotateclockWise.Name = "tsmRotateclockWise";
            this.tsmRotateclockWise.Size = new System.Drawing.Size(28, 21);
            this.tsmRotateclockWise.Text = "Rotate Clock Wise";
            //
            // tsmRotateAntiClockWise
            //
            this.tsmRotateAntiClockWise.AutoToolTip = true;
            this.tsmRotateAntiClockWise.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
            this.tsmRotateAntiClockWise.Image = ((System.Drawing.Image)(resources.GetObject("tsmRotateAntiClockWise.Image")));
            this.tsmRotateAntiClockWise.Name = "tsmRotateAntiClockWise";
            this.tsmRotateAntiClockWise.Size = new System.Drawing.Size(28, 21);
            this.tsmRotateAntiClockWise.Text = "Rotate AntiClock Wise";
            //
            // tsmPrint
            //
            this.tsmPrint.AutoToolTip = true;
            this.tsmPrint.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
            this.tsmPrint.Image = ((System.Drawing.Image)(resources.GetObject("tsmPrint.Image")));
            this.tsmPrint.Name = "tsmPrint";
            this.tsmPrint.Size = new System.Drawing.Size(28, 21);
            this.tsmPrint.Text = "Print";
            //
            // tsmZoom
            //
            this.tsmZoom.Name = "tsmZoom";
            this.tsmZoom.Size = new System.Drawing.Size(49, 21);
            this.tsmZoom.Text = "Zoom:";
            //
            // tsmZoomSize
            //
            this.tsmZoomSize.AutoToolTip = true;
            this.tsmZoomSize.BackColor = System.Drawing.SystemColors.InactiveCaptionText;
            this.tsmZoomSize.Items.AddRange(new object[] {
            "",
            "10%",
            "25%",
            "50%",
            "75%",
            "100%",
            "150%",
            "200%",
            "400%",
            "800%",
            "1500%",
            "Actual Size"});
            this.tsmZoomSize.Name = "tsmZoomSize";
            this.tsmZoomSize.Size = new System.Drawing.Size(121, 21);
            this.tsmZoomSize.ToolTipText = "Zoom (%)";
            //
            // tsmExit
            //
            this.tsmExit.Alignment = System.Windows.Forms.ToolStripItemAlignment.Right;
            this.tsmExit.AutoToolTip = true;
            this.tsmExit.Image = ((System.Drawing.Image)(resources.GetObject("tsmExit.Image")));
            this.tsmExit.Name = "tsmExit";
            this.tsmExit.Size = new System.Drawing.Size(28, 21);
            this.tsmExit.ToolTipText = "Exit ";
            //
            // ImageViewer
            //
            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
            this.Controls.Add(this.panel1);
            this.Name = "ImageViewer";
            this.Size = new System.Drawing.Size(634, 747);
            this.panel1.ResumeLayout(false);
            this.panel1.PerformLayout();
            this.menuStrip1.ResumeLayout(false);
            this.menuStrip1.PerformLayout();
            this.ResumeLayout(false);

        }
        #endregion
        private System.Windows.Forms.Panel panel1;
        private System.Windows.Forms.MenuStrip menuStrip1;
        private System.Windows.Forms.ToolStripMenuItem tsmClose;
        private System.Windows.Forms.ToolStripMenuItem tsmTools;
        private System.Windows.Forms.ToolStripMenuItem tsmNormal;
        private System.Windows.Forms.ToolStripMenuItem tsmZoomIn;
        private System.Windows.Forms.ToolStripMenuItem tsmFit;
        private System.Windows.Forms.ToolStripMenuItem tsmTZoomIn;
        private System.Windows.Forms.ToolStripMenuItem tsmTZoomOut;
        private System.Windows.Forms.ToolStripMenuItem tsmTRotateClockWise;
        private System.Windows.Forms.ToolStripMenuItem tsmTRotateAntiClockWise;
        private System.Windows.Forms.ToolStripMenuItem tsmZoomOut;
        private System.Windows.Forms.ToolStripMenuItem tsmZoom;
        private System.Windows.Forms.ToolStripComboBox tsmZoomSize;
        private System.Windows.Forms.ToolStripMenuItem tsmExit;
        private System.Windows.Forms.ToolStripMenuItem tsmRotateclockWise;
        private System.Windows.Forms.ToolStripMenuItem tsmRotateAntiClockWise;
        private Cyotek.Windows.Forms.ImageBox imageBox1;
        private System.Windows.Forms.ToolStripMenuItem tsmPrint;
    }
}
Code Behind

using System;
using System.Drawing;
using System.Windows.Forms;
using System.Drawing.Printing;

namespace TestEasyCon
{
    public partial class ImageViewer : UserControl
    {
        public ImageViewer()
        {
            InitializeComponent();
            tsmClose.Click += new EventHandler(CloseButtonClicked);
            tsmExit.Click += new EventHandler(CloseButtonClicked);
        }
       
        #region Declaration
        public delegate void CloseButtonEventHandler(object sender, EventArgs e);
        public event CloseButtonEventHandler ClickCloseButton;
        Image imgFile =null;
        #endregion

        #region Functions
        private void CloseButtonClicked(object sender, EventArgs e)
        {
            if (ClickCloseButton != null)
                ClickCloseButton(this, e);
        }
        /// <summary>
        /// Image Processing
        /// </summary>
        /// <param name="mode">Pass Mode(Normal|ZoomIn|Zoom Out|rotate Clock Wise|Rotate AnitClockWise)</param>
        private void ImageProcessing(string mode)
        {
            switch (mode)
            {
                case "Normal":
                    imageBox1.SizeToFit = true;
                    imageBox1.SizeToFit = false;
                    tsmZoomIn.Enabled = true;
                    tsmTZoomIn.Enabled = true;
                    tsmZoomSize.Text = imageBox1.Zoom.ToString() + "%";          
                    break;
                case "ZoomIn":
                    imageBox1.Zoom += 50;
                    tsmZoomSize.Text = imageBox1.Zoom.ToString() + "%";
                    break;
                case "ZoomOut":
                    imageBox1.Zoom -= 50;
                    tsmZoomSize.Text = imageBox1.Zoom.ToString() + "%";
                    break;
                case "RotateClockWise":
                    Image img = imageBox1.Image;
                    img.RotateFlip(RotateFlipType.Rotate270FlipXY);
                    Image imgtemp = img;
                    imageBox1.Image = imgtemp;
                    imageBox1.Refresh();
                    break;
                case "RotateAntiClockWise":
                    Image img1 = imageBox1.Image;
                    img1.RotateFlip(RotateFlipType.Rotate90FlipXY);
                    Image imgtemp1 = img1;
                    imageBox1.Image = imgtemp1;
                    imageBox1.Refresh();
                    break;

            }
        }
        /// <summary>
        /// Print Image Document
        /// </summary>
        /// <param name="path">Pass Path</param>
        public void PrintDocument(string path)
        {
            try
            {
                imgFile = Image.FromFile(path);
                PrintDocument prntDoc = new PrintDocument();
                PrintDialog prdDia = new PrintDialog();
                prntDoc.PrintPage += new PrintPageEventHandler(printDoc_PrintPage);
                prdDia.AllowPrintToFile = true;
                prdDia.AllowSelection = true;
                prdDia.AllowSomePages = true;
                prdDia.PrintToFile = true;
                DialogResult dialogue = prdDia.ShowDialog();
                if (dialogue == DialogResult.OK)
                {
                    prntDoc.DocumentName = path;
                    prntDoc.Print();
                }
                prdDia.Dispose();
            }
            catch (Exception ex)
            {
                Program.WriteLog(ex.Message, ex.StackTrace);
            }
        }
        private void printDoc_PrintPage(object sender, PrintPageEventArgs e)
        {
            Point ulCorner = new Point(0, 0);
            e.Graphics.DrawImage(imgFile, ulCorner);
        }
        #endregion

   
    }
}