using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using System.Data;

namespace Project1
{
	/// <summary>
	/// Summary description for Form1.
	/// </summary>
	public class Form1 : System.Windows.Forms.Form
	{
		public System.Windows.Forms.GroupBox Frame3;
		public System.Windows.Forms.ComboBox Combo6;
		public System.Windows.Forms.ComboBox Combo5;
		public System.Windows.Forms.ComboBox Combo4;
		public System.Windows.Forms.Label Label7;
		public System.Windows.Forms.Label Label6;
		public System.Windows.Forms.Label Label5;
		public System.Windows.Forms.GroupBox Frame2;
		public System.Windows.Forms.ComboBox Combo3;
		public System.Windows.Forms.ComboBox Combo2;
		public System.Windows.Forms.ComboBox Combo1;
		public System.Windows.Forms.Label Label4;
		public System.Windows.Forms.Label Label3;
		public System.Windows.Forms.Label Label2;
		public System.Windows.Forms.Label Label1;
		public System.Windows.Forms.GroupBox Frame1;
		internal System.Windows.Forms.RadioButton RadioButton3;
		internal System.Windows.Forms.RadioButton RadioButton2;
		internal System.Windows.Forms.RadioButton RadioButton1;
		public System.Windows.Forms.TextBox Text1;
		public System.Windows.Forms.Button Command3;
		public System.Windows.Forms.Button Command2;
		public System.Windows.Forms.Button Command1;
		private AxIMAGEKIT7Lib.AxImageKit ImageKit1;
		/// <summary>
		/// Required designer variable.
		/// </summary>
		private System.ComponentModel.Container components = null;

		private string DrawShape;
		private int PenColor;
		private IMAGEKIT7Lib.PenStyleConstants PenStyle;
		private short PenWidth;
		private int BrushColor;
		private IMAGEKIT7Lib.BrushStyleConstants BrushStyle;
		private int IkBackColor;

		public Form1()
		{
			//
			// Required for Windows Form Designer support
			//
			InitializeComponent();

			//
			// TODO: Add any constructor code after InitializeComponent call
			//
		}

		/// <summary>
		/// Clean up any resources being used.
		/// </summary>
		protected override void Dispose( bool disposing )
		{
			if( disposing )
			{
				if (components != null) 
				{
					components.Dispose();
				}
			}
			base.Dispose( disposing );
		}

		#region Windows Form 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.Resources.ResourceManager resources = new System.Resources.ResourceManager(typeof(Form1));
			this.Frame3 = new System.Windows.Forms.GroupBox();
			this.Combo6 = new System.Windows.Forms.ComboBox();
			this.Combo5 = new System.Windows.Forms.ComboBox();
			this.Combo4 = new System.Windows.Forms.ComboBox();
			this.Label7 = new System.Windows.Forms.Label();
			this.Label6 = new System.Windows.Forms.Label();
			this.Label5 = new System.Windows.Forms.Label();
			this.Frame2 = new System.Windows.Forms.GroupBox();
			this.Combo3 = new System.Windows.Forms.ComboBox();
			this.Combo2 = new System.Windows.Forms.ComboBox();
			this.Combo1 = new System.Windows.Forms.ComboBox();
			this.Label4 = new System.Windows.Forms.Label();
			this.Label3 = new System.Windows.Forms.Label();
			this.Label2 = new System.Windows.Forms.Label();
			this.Label1 = new System.Windows.Forms.Label();
			this.Frame1 = new System.Windows.Forms.GroupBox();
			this.RadioButton3 = new System.Windows.Forms.RadioButton();
			this.RadioButton2 = new System.Windows.Forms.RadioButton();
			this.RadioButton1 = new System.Windows.Forms.RadioButton();
			this.Text1 = new System.Windows.Forms.TextBox();
			this.Command3 = new System.Windows.Forms.Button();
			this.Command2 = new System.Windows.Forms.Button();
			this.Command1 = new System.Windows.Forms.Button();
			this.ImageKit1 = new AxIMAGEKIT7Lib.AxImageKit();
			this.Frame3.SuspendLayout();
			this.Frame2.SuspendLayout();
			this.Frame1.SuspendLayout();
			((System.ComponentModel.ISupportInitialize)(this.ImageKit1)).BeginInit();
			this.SuspendLayout();
			// 
			// Frame3
			// 
			this.Frame3.BackColor = System.Drawing.SystemColors.Control;
			this.Frame3.Controls.Add(this.Combo6);
			this.Frame3.Controls.Add(this.Combo5);
			this.Frame3.Controls.Add(this.Combo4);
			this.Frame3.Controls.Add(this.Label7);
			this.Frame3.Controls.Add(this.Label6);
			this.Frame3.Controls.Add(this.Label5);
			this.Frame3.Font = new System.Drawing.Font("Arial", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
			this.Frame3.ForeColor = System.Drawing.SystemColors.ControlText;
			this.Frame3.Location = new System.Drawing.Point(472, 300);
			this.Frame3.Name = "Frame3";
			this.Frame3.RightToLeft = System.Windows.Forms.RightToLeft.No;
			this.Frame3.Size = new System.Drawing.Size(153, 105);
			this.Frame3.TabIndex = 14;
			this.Frame3.TabStop = false;
			this.Frame3.Text = "Brush (Fill)";
			// 
			// Combo6
			// 
			this.Combo6.BackColor = System.Drawing.SystemColors.Window;
			this.Combo6.Cursor = System.Windows.Forms.Cursors.Default;
			this.Combo6.Font = new System.Drawing.Font("Arial", 8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
			this.Combo6.ForeColor = System.Drawing.SystemColors.WindowText;
			this.Combo6.Items.AddRange(new object[] {
														"White",
														"Black",
														"Red",
														"Blue",
														"Green",
														"Magenta",
														"Yellow",
														"Cyan"});
			this.Combo6.Location = new System.Drawing.Point(64, 64);
			this.Combo6.Name = "Combo6";
			this.Combo6.RightToLeft = System.Windows.Forms.RightToLeft.No;
			this.Combo6.Size = new System.Drawing.Size(81, 22);
			this.Combo6.TabIndex = 22;
			this.Combo6.Text = "White";
			this.Combo6.SelectedIndexChanged += new System.EventHandler(this.Combo6_SelectedIndexChanged);
			// 
			// Combo5
			// 
			this.Combo5.BackColor = System.Drawing.SystemColors.Window;
			this.Combo5.Cursor = System.Windows.Forms.Cursors.Default;
			this.Combo5.Font = new System.Drawing.Font("Arial", 8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
			this.Combo5.ForeColor = System.Drawing.SystemColors.WindowText;
			this.Combo5.Items.AddRange(new object[] {
														"Solid",
														"Diagonal",
														"Cross",
														"Diagonal Cross",
														"Horizontal",
														"Vertical",
														"Null"});
			this.Combo5.Location = new System.Drawing.Point(64, 40);
			this.Combo5.Name = "Combo5";
			this.Combo5.RightToLeft = System.Windows.Forms.RightToLeft.No;
			this.Combo5.Size = new System.Drawing.Size(81, 22);
			this.Combo5.TabIndex = 21;
			this.Combo5.Text = "Null";
			this.Combo5.SelectedIndexChanged += new System.EventHandler(this.Combo5_SelectedIndexChanged);
			// 
			// Combo4
			// 
			this.Combo4.BackColor = System.Drawing.SystemColors.Window;
			this.Combo4.Cursor = System.Windows.Forms.Cursors.Default;
			this.Combo4.Font = new System.Drawing.Font("Arial", 8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
			this.Combo4.ForeColor = System.Drawing.SystemColors.WindowText;
			this.Combo4.Items.AddRange(new object[] {
														"Black",
														"Red",
														"Blue",
														"Green",
														"Magenta",
														"Yellow",
														"Cyan",
														"White"});
			this.Combo4.Location = new System.Drawing.Point(64, 16);
			this.Combo4.Name = "Combo4";
			this.Combo4.RightToLeft = System.Windows.Forms.RightToLeft.No;
			this.Combo4.Size = new System.Drawing.Size(81, 22);
			this.Combo4.TabIndex = 18;
			this.Combo4.Text = "White";
			this.Combo4.SelectedIndexChanged += new System.EventHandler(this.Combo4_SelectedIndexChanged);
			// 
			// Label7
			// 
			this.Label7.BackColor = System.Drawing.SystemColors.Control;
			this.Label7.Cursor = System.Windows.Forms.Cursors.Default;
			this.Label7.Font = new System.Drawing.Font("Arial", 8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
			this.Label7.ForeColor = System.Drawing.SystemColors.ControlText;
			this.Label7.Location = new System.Drawing.Point(8, 64);
			this.Label7.Name = "Label7";
			this.Label7.RightToLeft = System.Windows.Forms.RightToLeft.No;
			this.Label7.Size = new System.Drawing.Size(57, 17);
			this.Label7.TabIndex = 23;
			this.Label7.Text = "Backcolor";
			// 
			// Label6
			// 
			this.Label6.BackColor = System.Drawing.SystemColors.Control;
			this.Label6.Cursor = System.Windows.Forms.Cursors.Default;
			this.Label6.Font = new System.Drawing.Font("Arial", 8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
			this.Label6.ForeColor = System.Drawing.SystemColors.ControlText;
			this.Label6.Location = new System.Drawing.Point(16, 40);
			this.Label6.Name = "Label6";
			this.Label6.RightToLeft = System.Windows.Forms.RightToLeft.No;
			this.Label6.Size = new System.Drawing.Size(32, 17);
			this.Label6.TabIndex = 20;
			this.Label6.Text = "Style";
			// 
			// Label5
			// 
			this.Label5.BackColor = System.Drawing.SystemColors.Control;
			this.Label5.Cursor = System.Windows.Forms.Cursors.Default;
			this.Label5.Font = new System.Drawing.Font("Arial", 8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
			this.Label5.ForeColor = System.Drawing.SystemColors.ControlText;
			this.Label5.Location = new System.Drawing.Point(16, 16);
			this.Label5.Name = "Label5";
			this.Label5.RightToLeft = System.Windows.Forms.RightToLeft.No;
			this.Label5.Size = new System.Drawing.Size(33, 17);
			this.Label5.TabIndex = 19;
			this.Label5.Text = "Color";
			// 
			// Frame2
			// 
			this.Frame2.BackColor = System.Drawing.SystemColors.Control;
			this.Frame2.Controls.Add(this.Combo3);
			this.Frame2.Controls.Add(this.Combo2);
			this.Frame2.Controls.Add(this.Combo1);
			this.Frame2.Controls.Add(this.Label4);
			this.Frame2.Controls.Add(this.Label3);
			this.Frame2.Controls.Add(this.Label2);
			this.Frame2.Controls.Add(this.Label1);
			this.Frame2.Font = new System.Drawing.Font("Arial", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
			this.Frame2.ForeColor = System.Drawing.SystemColors.ControlText;
			this.Frame2.Location = new System.Drawing.Point(472, 196);
			this.Frame2.Name = "Frame2";
			this.Frame2.RightToLeft = System.Windows.Forms.RightToLeft.No;
			this.Frame2.Size = new System.Drawing.Size(153, 97);
			this.Frame2.TabIndex = 13;
			this.Frame2.TabStop = false;
			this.Frame2.Text = "Pen (Border)";
			// 
			// Combo3
			// 
			this.Combo3.BackColor = System.Drawing.SystemColors.Window;
			this.Combo3.Cursor = System.Windows.Forms.Cursors.Default;
			this.Combo3.Font = new System.Drawing.Font("Arial", 8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
			this.Combo3.ForeColor = System.Drawing.SystemColors.WindowText;
			this.Combo3.Items.AddRange(new object[] {
														"1",
														"2",
														"3",
														"4",
														"5",
														"6",
														"7",
														"8",
														"9",
														"10"});
			this.Combo3.Location = new System.Drawing.Point(48, 64);
			this.Combo3.Name = "Combo3";
			this.Combo3.RightToLeft = System.Windows.Forms.RightToLeft.No;
			this.Combo3.Size = new System.Drawing.Size(41, 22);
			this.Combo3.TabIndex = 12;
			this.Combo3.Text = "1";
			this.Combo3.SelectedIndexChanged += new System.EventHandler(this.Combo3_SelectedIndexChanged);
			// 
			// Combo2
			// 
			this.Combo2.BackColor = System.Drawing.SystemColors.Window;
			this.Combo2.Cursor = System.Windows.Forms.Cursors.Default;
			this.Combo2.Font = new System.Drawing.Font("Arial", 8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
			this.Combo2.ForeColor = System.Drawing.SystemColors.WindowText;
			this.Combo2.Items.AddRange(new object[] {
														"Solid",
														"Dash",
														"Dot",
														"DashDot",
														"DashDotDot",
														"Null"});
			this.Combo2.Location = new System.Drawing.Point(48, 40);
			this.Combo2.Name = "Combo2";
			this.Combo2.RightToLeft = System.Windows.Forms.RightToLeft.No;
			this.Combo2.Size = new System.Drawing.Size(81, 22);
			this.Combo2.TabIndex = 10;
			this.Combo2.Text = "Solid";
			this.Combo2.SelectedIndexChanged += new System.EventHandler(this.Combo2_SelectedIndexChanged);
			// 
			// Combo1
			// 
			this.Combo1.BackColor = System.Drawing.SystemColors.Window;
			this.Combo1.Cursor = System.Windows.Forms.Cursors.Default;
			this.Combo1.Font = new System.Drawing.Font("Arial", 8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
			this.Combo1.ForeColor = System.Drawing.SystemColors.WindowText;
			this.Combo1.Items.AddRange(new object[] {
														"Black",
														"Red",
														"Blue",
														"Green",
														"Magenta",
														"Yellow",
														"Cyan"});
			this.Combo1.Location = new System.Drawing.Point(48, 16);
			this.Combo1.Name = "Combo1";
			this.Combo1.RightToLeft = System.Windows.Forms.RightToLeft.No;
			this.Combo1.Size = new System.Drawing.Size(81, 22);
			this.Combo1.TabIndex = 8;
			this.Combo1.Text = "Black";
			this.Combo1.SelectedIndexChanged += new System.EventHandler(this.Combo1_SelectedIndexChanged);
			// 
			// Label4
			// 
			this.Label4.BackColor = System.Drawing.SystemColors.Control;
			this.Label4.Cursor = System.Windows.Forms.Cursors.Default;
			this.Label4.Font = new System.Drawing.Font("Arial", 8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
			this.Label4.ForeColor = System.Drawing.SystemColors.ControlText;
			this.Label4.Location = new System.Drawing.Point(88, 64);
			this.Label4.Name = "Label4";
			this.Label4.RightToLeft = System.Windows.Forms.RightToLeft.No;
			this.Label4.Size = new System.Drawing.Size(33, 17);
			this.Label4.TabIndex = 14;
			this.Label4.Text = "Pixels";
			// 
			// Label3
			// 
			this.Label3.BackColor = System.Drawing.SystemColors.Control;
			this.Label3.Cursor = System.Windows.Forms.Cursors.Default;
			this.Label3.Font = new System.Drawing.Font("Arial", 8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
			this.Label3.ForeColor = System.Drawing.SystemColors.ControlText;
			this.Label3.Location = new System.Drawing.Point(16, 64);
			this.Label3.Name = "Label3";
			this.Label3.RightToLeft = System.Windows.Forms.RightToLeft.No;
			this.Label3.Size = new System.Drawing.Size(33, 17);
			this.Label3.TabIndex = 13;
			this.Label3.Text = "Width";
			// 
			// Label2
			// 
			this.Label2.BackColor = System.Drawing.SystemColors.Control;
			this.Label2.Cursor = System.Windows.Forms.Cursors.Default;
			this.Label2.Font = new System.Drawing.Font("Arial", 8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
			this.Label2.ForeColor = System.Drawing.SystemColors.ControlText;
			this.Label2.Location = new System.Drawing.Point(16, 40);
			this.Label2.Name = "Label2";
			this.Label2.RightToLeft = System.Windows.Forms.RightToLeft.No;
			this.Label2.Size = new System.Drawing.Size(33, 17);
			this.Label2.TabIndex = 11;
			this.Label2.Text = "Style";
			// 
			// Label1
			// 
			this.Label1.BackColor = System.Drawing.SystemColors.Control;
			this.Label1.Cursor = System.Windows.Forms.Cursors.Default;
			this.Label1.Font = new System.Drawing.Font("Arial", 8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
			this.Label1.ForeColor = System.Drawing.SystemColors.ControlText;
			this.Label1.Location = new System.Drawing.Point(16, 16);
			this.Label1.Name = "Label1";
			this.Label1.RightToLeft = System.Windows.Forms.RightToLeft.No;
			this.Label1.Size = new System.Drawing.Size(25, 17);
			this.Label1.TabIndex = 9;
			this.Label1.Text = "Color";
			// 
			// Frame1
			// 
			this.Frame1.BackColor = System.Drawing.SystemColors.Control;
			this.Frame1.Controls.Add(this.RadioButton3);
			this.Frame1.Controls.Add(this.RadioButton2);
			this.Frame1.Controls.Add(this.RadioButton1);
			this.Frame1.Font = new System.Drawing.Font("Arial", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
			this.Frame1.ForeColor = System.Drawing.SystemColors.ControlText;
			this.Frame1.Location = new System.Drawing.Point(472, 116);
			this.Frame1.Name = "Frame1";
			this.Frame1.RightToLeft = System.Windows.Forms.RightToLeft.No;
			this.Frame1.Size = new System.Drawing.Size(153, 73);
			this.Frame1.TabIndex = 12;
			this.Frame1.TabStop = false;
			this.Frame1.Text = "Select a Shape";
			// 
			// RadioButton3
			// 
			this.RadioButton3.Font = new System.Drawing.Font("Arial", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
			this.RadioButton3.Location = new System.Drawing.Point(16, 48);
			this.RadioButton3.Name = "RadioButton3";
			this.RadioButton3.Size = new System.Drawing.Size(104, 16);
			this.RadioButton3.TabIndex = 2;
			this.RadioButton3.Text = "Ellipse";
			this.RadioButton3.CheckedChanged += new System.EventHandler(this.RadioButton3_CheckedChanged);
			// 
			// RadioButton2
			// 
			this.RadioButton2.Font = new System.Drawing.Font("Arial", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
			this.RadioButton2.Location = new System.Drawing.Point(16, 32);
			this.RadioButton2.Name = "RadioButton2";
			this.RadioButton2.Size = new System.Drawing.Size(104, 16);
			this.RadioButton2.TabIndex = 1;
			this.RadioButton2.Text = "FillRect";
			this.RadioButton2.CheckedChanged += new System.EventHandler(this.RadioButton2_CheckedChanged);
			// 
			// RadioButton1
			// 
			this.RadioButton1.Font = new System.Drawing.Font("Arial", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
			this.RadioButton1.Location = new System.Drawing.Point(16, 16);
			this.RadioButton1.Name = "RadioButton1";
			this.RadioButton1.Size = new System.Drawing.Size(104, 16);
			this.RadioButton1.TabIndex = 0;
			this.RadioButton1.Text = "Rectangle";
			this.RadioButton1.CheckedChanged += new System.EventHandler(this.RadioButton1_CheckedChanged);
			// 
			// Text1
			// 
			this.Text1.AcceptsReturn = true;
			this.Text1.AutoSize = false;
			this.Text1.BackColor = System.Drawing.Color.FromArgb(((System.Byte)(255)), ((System.Byte)(255)), ((System.Byte)(192)));
			this.Text1.Cursor = System.Windows.Forms.Cursors.IBeam;
			this.Text1.Font = new System.Drawing.Font("Arial", 8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
			this.Text1.ForeColor = System.Drawing.Color.FromArgb(((System.Byte)(192)), ((System.Byte)(0)), ((System.Byte)(0)));
			this.Text1.Location = new System.Drawing.Point(8, 0);
			this.Text1.MaxLength = 0;
			this.Text1.Multiline = true;
			this.Text1.Name = "Text1";
			this.Text1.RightToLeft = System.Windows.Forms.RightToLeft.No;
			this.Text1.Size = new System.Drawing.Size(617, 64);
			this.Text1.TabIndex = 11;
			this.Text1.Text = @"The PrintDraw interface has numerous methods for drawing shapes. This sample illustrates 3 drawing methods and some pen and brush properties. Notice, for example, that for ellipses, pen width is always 1 when pen style is not solid. For FillRect, the pen properties are disabled completely. Other drawing methods, besides the ones shown here, include: Arc, Chord, FrameRect, Line, Pie, PolyBezier, Polygon, Polyline, and RoundRect. For details, please refer to the Help documentation";
			// 
			// Command3
			// 
			this.Command3.BackColor = System.Drawing.SystemColors.Control;
			this.Command3.Cursor = System.Windows.Forms.Cursors.Default;
			this.Command3.Font = new System.Drawing.Font("Arial", 8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
			this.Command3.ForeColor = System.Drawing.SystemColors.ControlText;
			this.Command3.Location = new System.Drawing.Point(472, 452);
			this.Command3.Name = "Command3";
			this.Command3.RightToLeft = System.Windows.Forms.RightToLeft.No;
			this.Command3.Size = new System.Drawing.Size(153, 33);
			this.Command3.TabIndex = 10;
			this.Command3.Text = "End";
			this.Command3.Click += new System.EventHandler(this.Command3_Click);
			// 
			// Command2
			// 
			this.Command2.BackColor = System.Drawing.SystemColors.Control;
			this.Command2.Cursor = System.Windows.Forms.Cursors.Default;
			this.Command2.Font = new System.Drawing.Font("Arial", 8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
			this.Command2.ForeColor = System.Drawing.SystemColors.ControlText;
			this.Command2.Location = new System.Drawing.Point(472, 412);
			this.Command2.Name = "Command2";
			this.Command2.RightToLeft = System.Windows.Forms.RightToLeft.No;
			this.Command2.Size = new System.Drawing.Size(153, 33);
			this.Command2.TabIndex = 9;
			this.Command2.Text = "Draw Shape";
			this.Command2.Click += new System.EventHandler(this.Command2_Click);
			// 
			// Command1
			// 
			this.Command1.BackColor = System.Drawing.SystemColors.Control;
			this.Command1.Cursor = System.Windows.Forms.Cursors.Default;
			this.Command1.Font = new System.Drawing.Font("Arial", 8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
			this.Command1.ForeColor = System.Drawing.SystemColors.ControlText;
			this.Command1.Location = new System.Drawing.Point(472, 76);
			this.Command1.Name = "Command1";
			this.Command1.RightToLeft = System.Windows.Forms.RightToLeft.No;
			this.Command1.Size = new System.Drawing.Size(153, 33);
			this.Command1.TabIndex = 8;
			this.Command1.Text = "Load Image";
			this.Command1.Click += new System.EventHandler(this.Command1_Click);
			// 
			// ImageKit1
			// 
			this.ImageKit1.Location = new System.Drawing.Point(8, 72);
			this.ImageKit1.Name = "ImageKit1";
			this.ImageKit1.OcxState = ((System.Windows.Forms.AxHost.State)(resources.GetObject("ImageKit1.OcxState")));
			this.ImageKit1.Size = new System.Drawing.Size(457, 409);
			this.ImageKit1.TabIndex = 15;
			// 
			// Form1
			// 
			this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
			this.ClientSize = new System.Drawing.Size(632, 489);
			this.Controls.Add(this.ImageKit1);
			this.Controls.Add(this.Frame3);
			this.Controls.Add(this.Frame2);
			this.Controls.Add(this.Frame1);
			this.Controls.Add(this.Text1);
			this.Controls.Add(this.Command3);
			this.Controls.Add(this.Command2);
			this.Controls.Add(this.Command1);
			this.Name = "Form1";
			this.Text = "Getting Started Drawing Shapes";
			this.Load += new System.EventHandler(this.Form1_Load);
			this.Frame3.ResumeLayout(false);
			this.Frame2.ResumeLayout(false);
			this.Frame1.ResumeLayout(false);
			((System.ComponentModel.ISupportInitialize)(this.ImageKit1)).EndInit();
			this.ResumeLayout(false);

		}
		#endregion

		/// <summary>
		/// The main entry point for the application.
		/// </summary>
		[STAThread]
		static void Main() 
		{
			Application.Run(new Form1());
		}

		private void Combo1_SelectedIndexChanged(object sender, System.EventArgs e)
		{
			if (Combo1.Text == "Black") 
			{
				PenColor = System.Drawing.ColorTranslator.ToWin32(System.Drawing.Color.Black);
			}
			else if (Combo1.Text == "Red") 
			{
				PenColor = System.Drawing.ColorTranslator.ToWin32(System.Drawing.Color.Red);
			}
			else if (Combo1.Text == "Blue") 
			{
				PenColor = System.Drawing.ColorTranslator.ToWin32(System.Drawing.Color.Blue);
			}
			else if (Combo1.Text == "Green") 
			{
				PenColor = System.Drawing.ColorTranslator.ToWin32(System.Drawing.Color.Green);
			}
			else if (Combo1.Text == "Magenta") 
			{
				PenColor = System.Drawing.ColorTranslator.ToWin32(System.Drawing.Color.Magenta);
			}
			else if (Combo1.Text == "Yellow") 
			{
				PenColor = System.Drawing.ColorTranslator.ToWin32(System.Drawing.Color.Yellow);
			}
			else if (Combo1.Text == "Cyan") 
			{
				PenColor = System.Drawing.ColorTranslator.ToWin32(System.Drawing.Color.Cyan);
			}
		}

		private void Combo2_SelectedIndexChanged(object sender, System.EventArgs e)
		{
			if (Combo2.Text == "Solid") 
			{
				PenStyle = IMAGEKIT7Lib.PenStyleConstants.ikPenSolid;
			}
			else if (Combo2.Text == "Dash") 
			{
				PenStyle = IMAGEKIT7Lib.PenStyleConstants.ikPenDash;
			}
			else if (Combo2.Text == "Dot") 
			{
				PenStyle = IMAGEKIT7Lib.PenStyleConstants.ikPenDot;
			}
			else if (Combo2.Text == "DashDot") 
			{
				PenStyle = IMAGEKIT7Lib.PenStyleConstants.ikPenDashDot;
			}
			else if (Combo2.Text == "DashDotDot") 
			{
				PenStyle = IMAGEKIT7Lib.PenStyleConstants.ikPenDashDotDot;
			}
			else if (Combo2.Text == "Null") 
			{
				PenStyle = IMAGEKIT7Lib.PenStyleConstants.ikPenNull;
			}
		}

		private void Combo3_SelectedIndexChanged(object sender, System.EventArgs e)
		{
			PenWidth = Convert.ToInt16(Combo3.Text);
		}

		private void Combo4_SelectedIndexChanged(object sender, System.EventArgs e)
		{
			if (Combo4.Text == "White") 
			{
				BrushColor = System.Drawing.ColorTranslator.ToWin32(System.Drawing.Color.White);
			}
			else if (Combo4.Text == "Black") 
			{
				BrushColor = System.Drawing.ColorTranslator.ToWin32(System.Drawing.Color.Black);
			}
			else if (Combo4.Text == "Red") 
			{
				BrushColor = System.Drawing.ColorTranslator.ToWin32(System.Drawing.Color.Red);
			}
			else if (Combo4.Text == "Blue") 
			{
				BrushColor = System.Drawing.ColorTranslator.ToWin32(System.Drawing.Color.Blue);
			}
			else if (Combo4.Text == "Green") 
			{
				BrushColor = System.Drawing.ColorTranslator.ToWin32(System.Drawing.Color.Green);
			}
			else if (Combo4.Text == "Magenta") 
			{
				BrushColor = System.Drawing.ColorTranslator.ToWin32(System.Drawing.Color.Magenta);
			}
			else if (Combo4.Text == "Yellow") 
			{
				BrushColor = System.Drawing.ColorTranslator.ToWin32(System.Drawing.Color.Yellow);
			}
			else if (Combo4.Text == "Cyan") 
			{
				BrushColor = System.Drawing.ColorTranslator.ToWin32(System.Drawing.Color.Cyan);
			}
		}

		private void Combo5_SelectedIndexChanged(object sender, System.EventArgs e)
		{
			if (Combo5.Text == "Solid") 
			{
				BrushStyle = IMAGEKIT7Lib.BrushStyleConstants.ikBrushSolid;
			}
			else if (Combo5.Text == "Diagonal") 
			{
				BrushStyle = IMAGEKIT7Lib.BrushStyleConstants.ikBrushHatchDiagcross;
			}
			else if (Combo5.Text == "Cross") 
			{
				BrushStyle = IMAGEKIT7Lib.BrushStyleConstants.ikBrushHatchCross;
			}
			else if (Combo5.Text == "Diagonal Cross") 
			{
				BrushStyle = IMAGEKIT7Lib.BrushStyleConstants.ikBrushHatchDiagcross;
			}
			else if (Combo5.Text == "Horizontal") 
			{
				BrushStyle = IMAGEKIT7Lib.BrushStyleConstants.ikBrushHatchHorizontal;
			}
			else if (Combo5.Text == "Vertical") 
			{
				BrushStyle = IMAGEKIT7Lib.BrushStyleConstants.ikBrushHatchVertical;
			}
			else if (Combo5.Text == "Null") 
			{
				BrushStyle = IMAGEKIT7Lib.BrushStyleConstants.ikBrushNull;
			}
		}

		private void Combo6_SelectedIndexChanged(object sender, System.EventArgs e)
		{
			if (Combo6.Text == "White") 
			{
				IkBackColor = System.Drawing.ColorTranslator.ToWin32(System.Drawing.Color.White);
			}
			else if (Combo6.Text == "Black") 
			{
				IkBackColor = System.Drawing.ColorTranslator.ToWin32(System.Drawing.Color.Black);
			}
			else if (Combo6.Text == "Red") 
			{
				IkBackColor = System.Drawing.ColorTranslator.ToWin32(System.Drawing.Color.Red);
			}
			else if (Combo6.Text == "Blue") 
			{
				IkBackColor = System.Drawing.ColorTranslator.ToWin32(System.Drawing.Color.Blue);
			}
			else if (Combo6.Text == "Green") 
			{
				IkBackColor = System.Drawing.ColorTranslator.ToWin32(System.Drawing.Color.Green);
			}
			else if (Combo6.Text == "Magenta") 
			{
				IkBackColor = System.Drawing.ColorTranslator.ToWin32(System.Drawing.Color.Magenta);
			}
			else if (Combo6.Text == "Yellow") 
			{
				IkBackColor = System.Drawing.ColorTranslator.ToWin32(System.Drawing.Color.Yellow);
			}
			else if (Combo6.Text == "Cyan") 
			{
				IkBackColor = System.Drawing.ColorTranslator.ToWin32(System.Drawing.Color.Cyan);
			}
		}

		private void Command1_Click(object sender, System.EventArgs e)
		{
			//displays the 'Open File' dialog and allows you to select an image to load...
			if (ImageKit1.File.OpenFileDialog() == false) 
			{
				return;
			}
		
			//loads the image...
			ImageKit1.File.LoadFile(IMAGEKIT7Lib.LoadFileConstants.ikLoad);
		
			//check to see that the loaded image is a raster image...
			if (ImageKit1.ImageKind != IMAGEKIT7Lib.ImageKindConstants.ikRasterImage) 
			{
				ImageKit1.FreeMemory(ImageKit1.ImageHandle);
				MessageBox.Show("Please load a raster image");
				return;
			}
		
			//displays the image in actual size display mode...
			ImageKit1.ScrollBar = true;
			ImageKit1.Display(IMAGEKIT7Lib.DispModeConstants.ikActualSize);
		}

		private void Command2_Click(object sender, System.EventArgs e)
		{
			bool ret;
		
		//check to see if an area is selected on the image
			if (ImageKit1.RectRight == 0) 
			{
				MessageBox.Show("Please use your mouse to select an area on the image.");
				return;
			}
		
			//retrieve pen and brush properties
			ImageKit1.PrintDraw.PenColor = PenColor;
			ImageKit1.PrintDraw.PenStyle = PenStyle;
			ImageKit1.PrintDraw.PenWidth = PenWidth;
			ImageKit1.PrintDraw.BrushColor = BrushColor;
			ImageKit1.PrintDraw.BrushStyle = BrushStyle;
			ImageKit1.PrintDraw.BackColor = Convert.ToUInt32(IkBackColor);
		
			if (DrawShape == "Rectangle") 
			{
				ret = ImageKit1.PrintDraw.Rectangle(ImageKit1.ImageHandle, ImageKit1.RectLeft, ImageKit1.RectTop, ImageKit1.RectRight, ImageKit1.RectBottom, IMAGEKIT7Lib.OutPutDeviceModeConstants.ikMemoryHandle);
			}
			else if (DrawShape == "FillRect") 
			{
				ret = ImageKit1.PrintDraw.FillRect(ImageKit1.ImageHandle, ImageKit1.RectLeft, ImageKit1.RectTop, ImageKit1.RectRight, ImageKit1.RectBottom, IMAGEKIT7Lib.OutPutDeviceModeConstants.ikMemoryHandle);
			}
			else if (DrawShape == "Ellipse") 
			{
				ret = ImageKit1.PrintDraw.Ellipse(ImageKit1.ImageHandle, ImageKit1.RectLeft, ImageKit1.RectTop, ImageKit1.RectRight, ImageKit1.RectBottom, IMAGEKIT7Lib.OutPutDeviceModeConstants.ikMemoryHandle);
			}
		
			//reset the selection area
			ImageKit1.RectLeft = 0;
			ImageKit1.RectTop = 0;
			ImageKit1.RectRight = 0;
			ImageKit1.RectBottom = 0;
		}

		private void Command3_Click(object sender, System.EventArgs e)
		{
			this.Close();
		}

		private void Form1_Load(object sender, System.EventArgs e)
		{
			//use the mouse to select an area on the image
			ImageKit1.RectDraw = true;
			
			//set the default shape to rectangle
			RadioButton1.Checked = true;
			
			//set the default pen color to black
			PenColor = System.Drawing.ColorTranslator.ToWin32(System.Drawing.Color.Black);
			
			//set the default pen style to solid
			PenStyle = IMAGEKIT7Lib.PenStyleConstants.ikPenSolid;
			
			//set the default pen width to 1
			PenWidth = 1;
			
			//set the default brush color to white
			BrushColor = System.Drawing.ColorTranslator.ToWin32(System.Drawing.Color.White);
			
			//set the default brush style to null
			BrushStyle = IMAGEKIT7Lib.BrushStyleConstants.ikBrushNull;
			
			//set the default backcolor to white
			IkBackColor = System.Drawing.ColorTranslator.ToWin32(System.Drawing.Color.White);
		}

		private void RadioButton1_CheckedChanged(object sender, System.EventArgs e)
		{
			DrawShape = "Rectangle";
		}

		private void RadioButton2_CheckedChanged(object sender, System.EventArgs e)
		{
			DrawShape = "FillRect";
		}

		private void RadioButton3_CheckedChanged(object sender, System.EventArgs e)
		{
			 DrawShape = "Ellipse";
		}
	}
}
