<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="ru">
		<id>http://nfex.ru/index.php?action=history&amp;feed=atom&amp;title=Csharp%2FC_Sharp%2FEvent%2FUI_Event</id>
		<title>Csharp/C Sharp/Event/UI Event - История изменений</title>
		<link rel="self" type="application/atom+xml" href="http://nfex.ru/index.php?action=history&amp;feed=atom&amp;title=Csharp%2FC_Sharp%2FEvent%2FUI_Event"/>
		<link rel="alternate" type="text/html" href="http://nfex.ru/index.php?title=Csharp/C_Sharp/Event/UI_Event&amp;action=history"/>
		<updated>2026-04-29T17:47:50Z</updated>
		<subtitle>История изменений этой страницы в вики</subtitle>
		<generator>MediaWiki 1.30.0</generator>

	<entry>
		<id>http://nfex.ru/index.php?title=Csharp/C_Sharp/Event/UI_Event&amp;diff=268&amp;oldid=prev</id>
		<title> в 15:31, 26 мая 2010</title>
		<link rel="alternate" type="text/html" href="http://nfex.ru/index.php?title=Csharp/C_Sharp/Event/UI_Event&amp;diff=268&amp;oldid=prev"/>
				<updated>2010-05-26T15:31:18Z</updated>
		
		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;tr style=&quot;vertical-align: top;&quot; lang=&quot;ru&quot;&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;← Предыдущая&lt;/td&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;Версия 15:31, 26 мая 2010&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; style=&quot;text-align: center;&quot; lang=&quot;ru&quot;&gt;&lt;div class=&quot;mw-diff-empty&quot;&gt;(нет различий)&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</summary>
			</entry>

	<entry>
		<id>http://nfex.ru/index.php?title=Csharp/C_Sharp/Event/UI_Event&amp;diff=269&amp;oldid=prev</id>
		<title>Admin: 1 версия</title>
		<link rel="alternate" type="text/html" href="http://nfex.ru/index.php?title=Csharp/C_Sharp/Event/UI_Event&amp;diff=269&amp;oldid=prev"/>
				<updated>2010-05-26T11:34:06Z</updated>
		
		<summary type="html">&lt;p&gt;1 версия&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Новая страница&lt;/b&gt;&lt;/p&gt;&lt;div&gt;==Add mouse click event to a Label==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
&amp;lt;source lang=&amp;quot;csharp&amp;quot;&amp;gt;&lt;br /&gt;
using System;&lt;br /&gt;
using System.Collections.Generic;&lt;br /&gt;
using System.ruponentModel;&lt;br /&gt;
using System.Data;&lt;br /&gt;
using System.Drawing;&lt;br /&gt;
using System.Text;&lt;br /&gt;
using System.Windows.Forms;&lt;br /&gt;
public class Form1 : Form&lt;br /&gt;
{&lt;br /&gt;
   Label Label1;&lt;br /&gt;
   TextBox TextBox1;&lt;br /&gt;
   Button Button1;&lt;br /&gt;
  public Form1()&lt;br /&gt;
  {&lt;br /&gt;
        InitializeComponent();&lt;br /&gt;
  }&lt;br /&gt;
   private void ctrlClick(System.Object sender, EventArgs e)&lt;br /&gt;
   {&lt;br /&gt;
     Control ctrl = (Control)sender;&lt;br /&gt;
     MessageBox.Show(&amp;quot;You clicked: &amp;quot; + ctrl.Name);&lt;br /&gt;
   }&lt;br /&gt;
  private void InitializeComponent()&lt;br /&gt;
  {&lt;br /&gt;
    this.Label1 = new System.Windows.Forms.Label();&lt;br /&gt;
    this.TextBox1 = new System.Windows.Forms.TextBox();&lt;br /&gt;
    this.Button1 = new System.Windows.Forms.Button();&lt;br /&gt;
    this.SuspendLayout();&lt;br /&gt;
    // &lt;br /&gt;
    // Label1&lt;br /&gt;
    // &lt;br /&gt;
    this.Label1.FlatStyle = System.Windows.Forms.FlatStyle.System;&lt;br /&gt;
    this.Label1.Font = new System.Drawing.Font(&amp;quot;Tahoma&amp;quot;, 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));&lt;br /&gt;
    this.Label1.Location = new System.Drawing.Point(14, 97);&lt;br /&gt;
    this.Label1.Name = &amp;quot;Label1&amp;quot;;&lt;br /&gt;
    this.Label1.Size = new System.Drawing.Size(112, 24);&lt;br /&gt;
    this.Label1.TabIndex = 8;&lt;br /&gt;
    this.Label1.Text = &amp;quot;Label1&amp;quot;;&lt;br /&gt;
    this.Label1.Click += new System.EventHandler(this.ctrlClick);&lt;br /&gt;
    // &lt;br /&gt;
    // TextBox1&lt;br /&gt;
    // &lt;br /&gt;
    this.TextBox1.Font = new System.Drawing.Font(&amp;quot;Tahoma&amp;quot;, 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));&lt;br /&gt;
    this.TextBox1.Location = new System.Drawing.Point(12, 61);&lt;br /&gt;
    this.TextBox1.Name = &amp;quot;TextBox1&amp;quot;;&lt;br /&gt;
    this.TextBox1.Size = new System.Drawing.Size(156, 21);&lt;br /&gt;
    this.TextBox1.TabIndex = 7;&lt;br /&gt;
    this.TextBox1.Text = &amp;quot;TextBox1&amp;quot;;&lt;br /&gt;
    this.TextBox1.Click += new System.EventHandler(this.ctrlClick);&lt;br /&gt;
    // &lt;br /&gt;
    // Button1&lt;br /&gt;
    // &lt;br /&gt;
    this.Button1.FlatStyle = System.Windows.Forms.FlatStyle.System;&lt;br /&gt;
    this.Button1.Font = new System.Drawing.Font(&amp;quot;Tahoma&amp;quot;, 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));&lt;br /&gt;
    this.Button1.Location = new System.Drawing.Point(12, 21);&lt;br /&gt;
    this.Button1.Name = &amp;quot;Button1&amp;quot;;&lt;br /&gt;
    this.Button1.Size = new System.Drawing.Size(96, 28);&lt;br /&gt;
    this.Button1.TabIndex = 6;&lt;br /&gt;
    this.Button1.Text = &amp;quot;Button1&amp;quot;;&lt;br /&gt;
    this.Button1.Click += new System.EventHandler(this.ctrlClick);&lt;br /&gt;
    // &lt;br /&gt;
    // Form1&lt;br /&gt;
    // &lt;br /&gt;
    this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);&lt;br /&gt;
    this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;&lt;br /&gt;
    this.ClientSize = new System.Drawing.Size(367, 281);&lt;br /&gt;
    this.Controls.Add(this.Label1);&lt;br /&gt;
    this.Controls.Add(this.TextBox1);&lt;br /&gt;
    this.Controls.Add(this.Button1);&lt;br /&gt;
    this.Font = new System.Drawing.Font(&amp;quot;Tahoma&amp;quot;, 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));&lt;br /&gt;
    this.Name = &amp;quot;Form1&amp;quot;;&lt;br /&gt;
    this.Text = &amp;quot;Control Medley&amp;quot;;&lt;br /&gt;
    this.ResumeLayout(false);&lt;br /&gt;
    this.PerformLayout();&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
  [STAThread]&lt;br /&gt;
  static void Main()&lt;br /&gt;
  {&lt;br /&gt;
    Application.EnableVisualStyles();&lt;br /&gt;
    Application.Run(new Form1());&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
           &lt;br /&gt;
       &amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Add mouse click event to TextBox==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
&amp;lt;source lang=&amp;quot;csharp&amp;quot;&amp;gt;&lt;br /&gt;
using System;&lt;br /&gt;
using System.Collections.Generic;&lt;br /&gt;
using System.ruponentModel;&lt;br /&gt;
using System.Data;&lt;br /&gt;
using System.Drawing;&lt;br /&gt;
using System.Text;&lt;br /&gt;
using System.Windows.Forms;&lt;br /&gt;
public class Form1 : Form&lt;br /&gt;
{&lt;br /&gt;
   Label Label1;&lt;br /&gt;
   TextBox TextBox1;&lt;br /&gt;
   Button Button1;&lt;br /&gt;
  public Form1()&lt;br /&gt;
  {&lt;br /&gt;
        InitializeComponent();&lt;br /&gt;
  }&lt;br /&gt;
   private void ctrlClick(System.Object sender, EventArgs e)&lt;br /&gt;
   {&lt;br /&gt;
     Control ctrl = (Control)sender;&lt;br /&gt;
     MessageBox.Show(&amp;quot;You clicked: &amp;quot; + ctrl.Name);&lt;br /&gt;
   }&lt;br /&gt;
  private void InitializeComponent()&lt;br /&gt;
  {&lt;br /&gt;
    this.Label1 = new System.Windows.Forms.Label();&lt;br /&gt;
    this.TextBox1 = new System.Windows.Forms.TextBox();&lt;br /&gt;
    this.Button1 = new System.Windows.Forms.Button();&lt;br /&gt;
    this.SuspendLayout();&lt;br /&gt;
    // &lt;br /&gt;
    // Label1&lt;br /&gt;
    // &lt;br /&gt;
    this.Label1.FlatStyle = System.Windows.Forms.FlatStyle.System;&lt;br /&gt;
    this.Label1.Font = new System.Drawing.Font(&amp;quot;Tahoma&amp;quot;, 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));&lt;br /&gt;
    this.Label1.Location = new System.Drawing.Point(14, 97);&lt;br /&gt;
    this.Label1.Name = &amp;quot;Label1&amp;quot;;&lt;br /&gt;
    this.Label1.Size = new System.Drawing.Size(112, 24);&lt;br /&gt;
    this.Label1.TabIndex = 8;&lt;br /&gt;
    this.Label1.Text = &amp;quot;Label1&amp;quot;;&lt;br /&gt;
    this.Label1.Click += new System.EventHandler(this.ctrlClick);&lt;br /&gt;
    // &lt;br /&gt;
    // TextBox1&lt;br /&gt;
    // &lt;br /&gt;
    this.TextBox1.Font = new System.Drawing.Font(&amp;quot;Tahoma&amp;quot;, 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));&lt;br /&gt;
    this.TextBox1.Location = new System.Drawing.Point(12, 61);&lt;br /&gt;
    this.TextBox1.Name = &amp;quot;TextBox1&amp;quot;;&lt;br /&gt;
    this.TextBox1.Size = new System.Drawing.Size(156, 21);&lt;br /&gt;
    this.TextBox1.TabIndex = 7;&lt;br /&gt;
    this.TextBox1.Text = &amp;quot;TextBox1&amp;quot;;&lt;br /&gt;
    this.TextBox1.Click += new System.EventHandler(this.ctrlClick);&lt;br /&gt;
    // &lt;br /&gt;
    // Button1&lt;br /&gt;
    // &lt;br /&gt;
    this.Button1.FlatStyle = System.Windows.Forms.FlatStyle.System;&lt;br /&gt;
    this.Button1.Font = new System.Drawing.Font(&amp;quot;Tahoma&amp;quot;, 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));&lt;br /&gt;
    this.Button1.Location = new System.Drawing.Point(12, 21);&lt;br /&gt;
    this.Button1.Name = &amp;quot;Button1&amp;quot;;&lt;br /&gt;
    this.Button1.Size = new System.Drawing.Size(96, 28);&lt;br /&gt;
    this.Button1.TabIndex = 6;&lt;br /&gt;
    this.Button1.Text = &amp;quot;Button1&amp;quot;;&lt;br /&gt;
    this.Button1.Click += new System.EventHandler(this.ctrlClick);&lt;br /&gt;
    // &lt;br /&gt;
    // Form1&lt;br /&gt;
    // &lt;br /&gt;
    this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);&lt;br /&gt;
    this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;&lt;br /&gt;
    this.ClientSize = new System.Drawing.Size(367, 281);&lt;br /&gt;
    this.Controls.Add(this.Label1);&lt;br /&gt;
    this.Controls.Add(this.TextBox1);&lt;br /&gt;
    this.Controls.Add(this.Button1);&lt;br /&gt;
    this.Font = new System.Drawing.Font(&amp;quot;Tahoma&amp;quot;, 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));&lt;br /&gt;
    this.Name = &amp;quot;Form1&amp;quot;;&lt;br /&gt;
    this.Text = &amp;quot;Control Medley&amp;quot;;&lt;br /&gt;
    this.ResumeLayout(false);&lt;br /&gt;
    this.PerformLayout();&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
  [STAThread]&lt;br /&gt;
  static void Main()&lt;br /&gt;
  {&lt;br /&gt;
    Application.EnableVisualStyles();&lt;br /&gt;
    Application.Run(new Form1());&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
           &lt;br /&gt;
       &amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Event Tracker==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
&amp;lt;source lang=&amp;quot;csharp&amp;quot;&amp;gt;&lt;br /&gt;
/*&lt;br /&gt;
User Interfaces in C#: Windows Forms and Custom Controls&lt;br /&gt;
by Matthew MacDonald&lt;br /&gt;
Publisher: Apress&lt;br /&gt;
ISBN: 1590590457&lt;br /&gt;
*/&lt;br /&gt;
using System;&lt;br /&gt;
using System.Drawing;&lt;br /&gt;
using System.Collections;&lt;br /&gt;
using System.ruponentModel;&lt;br /&gt;
using System.Windows.Forms;&lt;br /&gt;
using System.Data;&lt;br /&gt;
namespace EventTracker&lt;br /&gt;
{&lt;br /&gt;
    /// &amp;lt;summary&amp;gt;&lt;br /&gt;
    /// Summary description for EventTracker.&lt;br /&gt;
    /// &amp;lt;/summary&amp;gt;&lt;br /&gt;
    public class EventTracker : System.Windows.Forms.Form&lt;br /&gt;
    {&lt;br /&gt;
        internal System.Windows.Forms.GroupBox GroupBox1;&lt;br /&gt;
        internal System.Windows.Forms.Label Label4;&lt;br /&gt;
        internal System.Windows.Forms.Label Label1;&lt;br /&gt;
        internal System.Windows.Forms.PictureBox pic;&lt;br /&gt;
        internal System.Windows.Forms.TextBox txt;&lt;br /&gt;
        internal System.Windows.Forms.Button cmd;&lt;br /&gt;
        internal System.Windows.Forms.Label Label2;&lt;br /&gt;
        internal System.Windows.Forms.Label Label3;&lt;br /&gt;
        internal System.Windows.Forms.ListBox lstLog;&lt;br /&gt;
        /// &amp;lt;summary&amp;gt;&lt;br /&gt;
        /// Required designer variable.&lt;br /&gt;
        /// &amp;lt;/summary&amp;gt;&lt;br /&gt;
        private System.ruponentModel.Container components = null;&lt;br /&gt;
        public EventTracker()&lt;br /&gt;
        {&lt;br /&gt;
            //&lt;br /&gt;
            // Required for Windows Form Designer support&lt;br /&gt;
            //&lt;br /&gt;
            InitializeComponent();&lt;br /&gt;
            //&lt;br /&gt;
            // TODO: Add any constructor code after InitializeComponent call&lt;br /&gt;
            //&lt;br /&gt;
        }&lt;br /&gt;
        /// &amp;lt;summary&amp;gt;&lt;br /&gt;
        /// Clean up any resources being used.&lt;br /&gt;
        /// &amp;lt;/summary&amp;gt;&lt;br /&gt;
        protected override void Dispose( bool disposing )&lt;br /&gt;
        {&lt;br /&gt;
            if( disposing )&lt;br /&gt;
            {&lt;br /&gt;
                if (components != null) &lt;br /&gt;
                {&lt;br /&gt;
                    components.Dispose();&lt;br /&gt;
                }&lt;br /&gt;
            }&lt;br /&gt;
            base.Dispose( disposing );&lt;br /&gt;
        }&lt;br /&gt;
        #region Windows Form Designer generated code&lt;br /&gt;
        /// &amp;lt;summary&amp;gt;&lt;br /&gt;
        /// Required method for Designer support - do not modify&lt;br /&gt;
        /// the contents of this method with the code editor.&lt;br /&gt;
        /// &amp;lt;/summary&amp;gt;&lt;br /&gt;
        private void InitializeComponent()&lt;br /&gt;
        {&lt;br /&gt;
            this.GroupBox1 = new System.Windows.Forms.GroupBox();&lt;br /&gt;
            this.Label4 = new System.Windows.Forms.Label();&lt;br /&gt;
            this.Label1 = new System.Windows.Forms.Label();&lt;br /&gt;
            this.pic = new System.Windows.Forms.PictureBox();&lt;br /&gt;
            this.txt = new System.Windows.Forms.TextBox();&lt;br /&gt;
            this.cmd = new System.Windows.Forms.Button();&lt;br /&gt;
            this.Label2 = new System.Windows.Forms.Label();&lt;br /&gt;
            this.Label3 = new System.Windows.Forms.Label();&lt;br /&gt;
            this.lstLog = new System.Windows.Forms.ListBox();&lt;br /&gt;
            this.GroupBox1.SuspendLayout();&lt;br /&gt;
            this.SuspendLayout();&lt;br /&gt;
            // &lt;br /&gt;
            // GroupBox1&lt;br /&gt;
            // &lt;br /&gt;
            this.GroupBox1.Anchor = ((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) &lt;br /&gt;
                | System.Windows.Forms.AnchorStyles.Right);&lt;br /&gt;
            this.GroupBox1.Controls.AddRange(new System.Windows.Forms.Control[] {&lt;br /&gt;
                                                                                    this.Label4,&lt;br /&gt;
                                                                                    this.Label1,&lt;br /&gt;
                                                                                    this.pic,&lt;br /&gt;
                                                                                    this.txt,&lt;br /&gt;
                                                                                    this.cmd,&lt;br /&gt;
                                                                                    this.Label2});&lt;br /&gt;
            this.GroupBox1.FlatStyle = System.Windows.Forms.FlatStyle.System;&lt;br /&gt;
            this.GroupBox1.Location = new System.Drawing.Point(8, 5);&lt;br /&gt;
            this.GroupBox1.Name = &amp;quot;GroupBox1&amp;quot;;&lt;br /&gt;
            this.GroupBox1.Size = new System.Drawing.Size(384, 148);&lt;br /&gt;
            this.GroupBox1.TabIndex = 9;&lt;br /&gt;
            this.GroupBox1.TabStop = false;&lt;br /&gt;
            // &lt;br /&gt;
            // Label4&lt;br /&gt;
            // &lt;br /&gt;
            this.Label4.Location = new System.Drawing.Point(92, 108);&lt;br /&gt;
            this.Label4.Name = &amp;quot;Label4&amp;quot;;&lt;br /&gt;
            this.Label4.Size = new System.Drawing.Size(56, 16);&lt;br /&gt;
            this.Label4.TabIndex = 5;&lt;br /&gt;
            this.Label4.Text = &amp;quot;And here:&amp;quot;;&lt;br /&gt;
            // &lt;br /&gt;
            // Label1&lt;br /&gt;
            // &lt;br /&gt;
            this.Label1.Location = new System.Drawing.Point(6, 24);&lt;br /&gt;
            this.Label1.Name = &amp;quot;Label1&amp;quot;;&lt;br /&gt;
            this.Label1.Size = new System.Drawing.Size(144, 16);&lt;br /&gt;
            this.Label1.TabIndex = 2;&lt;br /&gt;
            this.Label1.Text = &amp;quot;Test keyboard events here:&amp;quot;;&lt;br /&gt;
            // &lt;br /&gt;
            // pic&lt;br /&gt;
            // &lt;br /&gt;
            this.pic.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;&lt;br /&gt;
            this.pic.Location = new System.Drawing.Point(156, 48);&lt;br /&gt;
            this.pic.Name = &amp;quot;pic&amp;quot;;&lt;br /&gt;
            this.pic.Size = new System.Drawing.Size(192, 48);&lt;br /&gt;
            this.pic.TabIndex = 3;&lt;br /&gt;
            this.pic.TabStop = false;&lt;br /&gt;
            this.pic.Click += new System.EventHandler(this.pic_Click);&lt;br /&gt;
            this.pic.MouseEnter += new System.EventHandler(this.pic_MouseEnter);&lt;br /&gt;
            this.pic.MouseHover += new System.EventHandler(this.pic_MouseHover);&lt;br /&gt;
            this.pic.MouseUp += new System.Windows.Forms.MouseEventHandler(this.pic_MouseUp);&lt;br /&gt;
            this.pic.DoubleClick += new System.EventHandler(this.pic_DoubleClick);&lt;br /&gt;
            this.pic.MouseLeave += new System.EventHandler(this.pic_MouseLeave);&lt;br /&gt;
            this.pic.MouseDown += new System.Windows.Forms.MouseEventHandler(this.pic_MouseDown);&lt;br /&gt;
            // &lt;br /&gt;
            // txt&lt;br /&gt;
            // &lt;br /&gt;
            this.txt.Location = new System.Drawing.Point(156, 20);&lt;br /&gt;
            this.txt.Name = &amp;quot;txt&amp;quot;;&lt;br /&gt;
            this.txt.Size = new System.Drawing.Size(192, 21);&lt;br /&gt;
            this.txt.TabIndex = 1;&lt;br /&gt;
            this.txt.Text = &amp;quot;&amp;quot;;&lt;br /&gt;
            this.txt.KeyDown += new System.Windows.Forms.KeyEventHandler(this.txt_KeyDown);&lt;br /&gt;
            this.txt.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.txt_KeyPress);&lt;br /&gt;
            this.txt.TextChanged += new System.EventHandler(this.txt_TextChanged);&lt;br /&gt;
            this.txt.KeyUp += new System.Windows.Forms.KeyEventHandler(this.txt_KeyUp);&lt;br /&gt;
            // &lt;br /&gt;
            // cmd&lt;br /&gt;
            // &lt;br /&gt;
            this.cmd.FlatStyle = System.Windows.Forms.FlatStyle.System;&lt;br /&gt;
            this.cmd.Location = new System.Drawing.Point(156, 100);&lt;br /&gt;
            this.cmd.Name = &amp;quot;cmd&amp;quot;;&lt;br /&gt;
            this.cmd.Size = new System.Drawing.Size(88, 28);&lt;br /&gt;
            this.cmd.TabIndex = 4;&lt;br /&gt;
            this.cmd.Text = &amp;quot;Button1&amp;quot;;&lt;br /&gt;
            this.cmd.Click += new System.EventHandler(this.pic_Click);&lt;br /&gt;
            this.cmd.MouseUp += new System.Windows.Forms.MouseEventHandler(this.pic_MouseUp);&lt;br /&gt;
            this.cmd.MouseEnter += new System.EventHandler(this.pic_MouseEnter);&lt;br /&gt;
            this.cmd.MouseHover += new System.EventHandler(this.pic_MouseHover);&lt;br /&gt;
            this.cmd.MouseLeave += new System.EventHandler(this.pic_MouseLeave);&lt;br /&gt;
            this.cmd.MouseDown += new System.Windows.Forms.MouseEventHandler(this.pic_MouseDown);&lt;br /&gt;
            // &lt;br /&gt;
            // Label2&lt;br /&gt;
            // &lt;br /&gt;
            this.Label2.Location = new System.Drawing.Point(20, 52);&lt;br /&gt;
            this.Label2.Name = &amp;quot;Label2&amp;quot;;&lt;br /&gt;
            this.Label2.Size = new System.Drawing.Size(128, 16);&lt;br /&gt;
            this.Label2.TabIndex = 2;&lt;br /&gt;
            this.Label2.Text = &amp;quot;Test mouse events here:&amp;quot;;&lt;br /&gt;
            // &lt;br /&gt;
            // Label3&lt;br /&gt;
            // &lt;br /&gt;
            this.Label3.Location = new System.Drawing.Point(24, 105);&lt;br /&gt;
            this.Label3.Name = &amp;quot;Label3&amp;quot;;&lt;br /&gt;
            this.Label3.Size = new System.Drawing.Size(64, 24);&lt;br /&gt;
            this.Label3.TabIndex = 8;&lt;br /&gt;
            this.Label3.Text = &amp;quot;Label3&amp;quot;;&lt;br /&gt;
            // &lt;br /&gt;
            // lstLog&lt;br /&gt;
            // &lt;br /&gt;
            this.lstLog.Anchor = (((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) &lt;br /&gt;
                | System.Windows.Forms.AnchorStyles.Left) &lt;br /&gt;
                | System.Windows.Forms.AnchorStyles.Right);&lt;br /&gt;
            this.lstLog.IntegralHeight = false;&lt;br /&gt;
            this.lstLog.Location = new System.Drawing.Point(8, 161);&lt;br /&gt;
            this.lstLog.Name = &amp;quot;lstLog&amp;quot;;&lt;br /&gt;
            this.lstLog.Size = new System.Drawing.Size(384, 212);&lt;br /&gt;
            this.lstLog.TabIndex = 7;&lt;br /&gt;
            // &lt;br /&gt;
            // EventTracker&lt;br /&gt;
            // &lt;br /&gt;
            this.AutoScaleBaseSize = new System.Drawing.Size(5, 14);&lt;br /&gt;
            this.ClientSize = new System.Drawing.Size(400, 378);&lt;br /&gt;
            this.Controls.AddRange(new System.Windows.Forms.Control[] {&lt;br /&gt;
                                                                          this.GroupBox1,&lt;br /&gt;
                                                                          this.Label3,&lt;br /&gt;
                                                                          this.lstLog});&lt;br /&gt;
            this.Font = new System.Drawing.Font(&amp;quot;Tahoma&amp;quot;, 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));&lt;br /&gt;
            this.Name = &amp;quot;EventTracker&amp;quot;;&lt;br /&gt;
            this.Text = &amp;quot;Event Tracker&amp;quot;;&lt;br /&gt;
            this.GroupBox1.ResumeLayout(false);&lt;br /&gt;
            this.ResumeLayout(false);&lt;br /&gt;
        }&lt;br /&gt;
        #endregion&lt;br /&gt;
&lt;br /&gt;
        private void Log(String data)&lt;br /&gt;
        {&lt;br /&gt;
            lstLog.Items.Add(data);&lt;br /&gt;
            int itemsPerPage = (int)(lstLog.Height / lstLog.ItemHeight);&lt;br /&gt;
            lstLog.TopIndex = lstLog.Items.Count - itemsPerPage;&lt;br /&gt;
        }&lt;br /&gt;
                                                                                                    &lt;br /&gt;
        /// &amp;lt;summary&amp;gt;&lt;br /&gt;
        /// The main entry point for the application.&lt;br /&gt;
        /// &amp;lt;/summary&amp;gt;&lt;br /&gt;
        [STAThread]&lt;br /&gt;
        static void Main() &lt;br /&gt;
        {&lt;br /&gt;
            Application.Run(new EventTracker());&lt;br /&gt;
        }&lt;br /&gt;
        private void txt_KeyDown(object sender, System.Windows.Forms.KeyEventArgs e)&lt;br /&gt;
        {&lt;br /&gt;
            Log(&amp;quot;Key Down: &amp;quot; + e.KeyCode.ToString() + e.KeyValue.ToString());&lt;br /&gt;
        }&lt;br /&gt;
        private void txt_KeyPress(object sender, System.Windows.Forms.KeyPressEventArgs e)&lt;br /&gt;
        {&lt;br /&gt;
            Log(&amp;quot;Key Press: &amp;quot; + e.KeyChar.ToString());&lt;br /&gt;
        }&lt;br /&gt;
        private void txt_KeyUp(object sender, System.Windows.Forms.KeyEventArgs e)&lt;br /&gt;
        {&lt;br /&gt;
            Log(&amp;quot;Key Up: &amp;quot; + e.KeyCode.ToString() + e.KeyValue.ToString() + &amp;quot; Text is: &amp;quot; + txt.Text);&lt;br /&gt;
        }&lt;br /&gt;
        private void txt_TextChanged(object sender, System.EventArgs e)&lt;br /&gt;
        {&lt;br /&gt;
            Log(&amp;quot;Changed: &amp;quot; + &amp;quot; Text is: &amp;quot; + txt.Text);&lt;br /&gt;
        }&lt;br /&gt;
        private void pic_MouseEnter(object sender, System.EventArgs e)&lt;br /&gt;
        {&lt;br /&gt;
            Log(&amp;quot;Mouse Enter&amp;quot;);&lt;br /&gt;
        }&lt;br /&gt;
        private void pic_MouseHover(object sender, System.EventArgs e)&lt;br /&gt;
        {&lt;br /&gt;
            Log(&amp;quot;Mouse Hover&amp;quot;);&lt;br /&gt;
        }&lt;br /&gt;
        private void pic_MouseDown(object sender, System.Windows.Forms.MouseEventArgs e)&lt;br /&gt;
        {&lt;br /&gt;
            Log(&amp;quot;Mouse Down: X=&amp;quot; + e.X.ToString() + &amp;quot;Y=&amp;quot; + e.Y.ToString() + &amp;quot; Button=&amp;quot; + e.Button.ToString());&lt;br /&gt;
        }&lt;br /&gt;
        private void pic_MouseUp(object sender, System.Windows.Forms.MouseEventArgs e)&lt;br /&gt;
        {&lt;br /&gt;
            Log(&amp;quot;Mouse Down: X=&amp;quot; + e.X.ToString() + &amp;quot;Y=&amp;quot; + e.Y.ToString() + &amp;quot; Button=&amp;quot; + e.Button.ToString());&lt;br /&gt;
        }&lt;br /&gt;
        private void pic_Click(object sender, System.EventArgs e)&lt;br /&gt;
        {&lt;br /&gt;
            Log(&amp;quot;Click&amp;quot;);&lt;br /&gt;
        }&lt;br /&gt;
        private void pic_DoubleClick(object sender, System.EventArgs e)&lt;br /&gt;
        {&lt;br /&gt;
            Log(&amp;quot;Double Click&amp;quot;);&lt;br /&gt;
        }&lt;br /&gt;
        private void pic_MouseLeave(object sender, System.EventArgs e)&lt;br /&gt;
        {&lt;br /&gt;
            Log(&amp;quot;Mouse Leave&amp;quot;);&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
           &lt;br /&gt;
       &amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Get event name for sender==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
&amp;lt;source lang=&amp;quot;csharp&amp;quot;&amp;gt;&lt;br /&gt;
using System;&lt;br /&gt;
using System.Collections.Generic;&lt;br /&gt;
using System.ruponentModel;&lt;br /&gt;
using System.Data;&lt;br /&gt;
using System.Drawing;&lt;br /&gt;
using System.Text;&lt;br /&gt;
using System.Windows.Forms;&lt;br /&gt;
public class Form1 : Form&lt;br /&gt;
{&lt;br /&gt;
   Label Label1;&lt;br /&gt;
   TextBox TextBox1;&lt;br /&gt;
   Button Button1;&lt;br /&gt;
  public Form1()&lt;br /&gt;
  {&lt;br /&gt;
        InitializeComponent();&lt;br /&gt;
  }&lt;br /&gt;
   private void ctrlClick(System.Object sender, EventArgs e)&lt;br /&gt;
   {&lt;br /&gt;
     Control ctrl = (Control)sender;&lt;br /&gt;
     MessageBox.Show(&amp;quot;You clicked: &amp;quot; + ctrl.Name);&lt;br /&gt;
   }&lt;br /&gt;
  private void InitializeComponent()&lt;br /&gt;
  {&lt;br /&gt;
    this.Label1 = new System.Windows.Forms.Label();&lt;br /&gt;
    this.TextBox1 = new System.Windows.Forms.TextBox();&lt;br /&gt;
    this.Button1 = new System.Windows.Forms.Button();&lt;br /&gt;
    this.SuspendLayout();&lt;br /&gt;
    // &lt;br /&gt;
    // Label1&lt;br /&gt;
    // &lt;br /&gt;
    this.Label1.FlatStyle = System.Windows.Forms.FlatStyle.System;&lt;br /&gt;
    this.Label1.Font = new System.Drawing.Font(&amp;quot;Tahoma&amp;quot;, 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));&lt;br /&gt;
    this.Label1.Location = new System.Drawing.Point(14, 97);&lt;br /&gt;
    this.Label1.Name = &amp;quot;Label1&amp;quot;;&lt;br /&gt;
    this.Label1.Size = new System.Drawing.Size(112, 24);&lt;br /&gt;
    this.Label1.TabIndex = 8;&lt;br /&gt;
    this.Label1.Text = &amp;quot;Label1&amp;quot;;&lt;br /&gt;
    this.Label1.Click += new System.EventHandler(this.ctrlClick);&lt;br /&gt;
    // &lt;br /&gt;
    // TextBox1&lt;br /&gt;
    // &lt;br /&gt;
    this.TextBox1.Font = new System.Drawing.Font(&amp;quot;Tahoma&amp;quot;, 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));&lt;br /&gt;
    this.TextBox1.Location = new System.Drawing.Point(12, 61);&lt;br /&gt;
    this.TextBox1.Name = &amp;quot;TextBox1&amp;quot;;&lt;br /&gt;
    this.TextBox1.Size = new System.Drawing.Size(156, 21);&lt;br /&gt;
    this.TextBox1.TabIndex = 7;&lt;br /&gt;
    this.TextBox1.Text = &amp;quot;TextBox1&amp;quot;;&lt;br /&gt;
    this.TextBox1.Click += new System.EventHandler(this.ctrlClick);&lt;br /&gt;
    // &lt;br /&gt;
    // Button1&lt;br /&gt;
    // &lt;br /&gt;
    this.Button1.FlatStyle = System.Windows.Forms.FlatStyle.System;&lt;br /&gt;
    this.Button1.Font = new System.Drawing.Font(&amp;quot;Tahoma&amp;quot;, 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));&lt;br /&gt;
    this.Button1.Location = new System.Drawing.Point(12, 21);&lt;br /&gt;
    this.Button1.Name = &amp;quot;Button1&amp;quot;;&lt;br /&gt;
    this.Button1.Size = new System.Drawing.Size(96, 28);&lt;br /&gt;
    this.Button1.TabIndex = 6;&lt;br /&gt;
    this.Button1.Text = &amp;quot;Button1&amp;quot;;&lt;br /&gt;
    this.Button1.Click += new System.EventHandler(this.ctrlClick);&lt;br /&gt;
    // &lt;br /&gt;
    // Form1&lt;br /&gt;
    // &lt;br /&gt;
    this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);&lt;br /&gt;
    this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;&lt;br /&gt;
    this.ClientSize = new System.Drawing.Size(367, 281);&lt;br /&gt;
    this.Controls.Add(this.Label1);&lt;br /&gt;
    this.Controls.Add(this.TextBox1);&lt;br /&gt;
    this.Controls.Add(this.Button1);&lt;br /&gt;
    this.Font = new System.Drawing.Font(&amp;quot;Tahoma&amp;quot;, 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));&lt;br /&gt;
    this.Name = &amp;quot;Form1&amp;quot;;&lt;br /&gt;
    this.Text = &amp;quot;Control Medley&amp;quot;;&lt;br /&gt;
    this.ResumeLayout(false);&lt;br /&gt;
    this.PerformLayout();&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
  [STAThread]&lt;br /&gt;
  static void Main()&lt;br /&gt;
  {&lt;br /&gt;
    Application.EnableVisualStyles();&lt;br /&gt;
    Application.Run(new Form1());&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
           &lt;br /&gt;
       &amp;lt;/source&amp;gt;&lt;/div&gt;</summary>
		<author><name>Admin</name></author>	</entry>

	</feed>