<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="ru">
		<id>http://www.vbex.ru/index.php?action=history&amp;feed=atom&amp;title=VB.Net%2FGUI%2FGUI_Event</id>
		<title>VB.Net/GUI/GUI Event - История изменений</title>
		<link rel="self" type="application/atom+xml" href="http://www.vbex.ru/index.php?action=history&amp;feed=atom&amp;title=VB.Net%2FGUI%2FGUI_Event"/>
		<link rel="alternate" type="text/html" href="http://www.vbex.ru/index.php?title=VB.Net/GUI/GUI_Event&amp;action=history"/>
		<updated>2026-04-06T00:08:37Z</updated>
		<subtitle>История изменений этой страницы в вики</subtitle>
		<generator>MediaWiki 1.30.0</generator>

	<entry>
		<id>http://www.vbex.ru/index.php?title=VB.Net/GUI/GUI_Event&amp;diff=532&amp;oldid=prev</id>
		<title> в 16:40, 26 мая 2010</title>
		<link rel="alternate" type="text/html" href="http://www.vbex.ru/index.php?title=VB.Net/GUI/GUI_Event&amp;diff=532&amp;oldid=prev"/>
				<updated>2010-05-26T16:40:06Z</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;Версия 16:40, 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://www.vbex.ru/index.php?title=VB.Net/GUI/GUI_Event&amp;diff=533&amp;oldid=prev</id>
		<title>Admin: 1 версия</title>
		<link rel="alternate" type="text/html" href="http://www.vbex.ru/index.php?title=VB.Net/GUI/GUI_Event&amp;diff=533&amp;oldid=prev"/>
				<updated>2010-05-26T12:44:22Z</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 window message to a ListBox==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
&amp;lt;source lang=&amp;quot;vbnet&amp;quot;&amp;gt;&lt;br /&gt;
Imports System&lt;br /&gt;
Imports System.Windows.Forms&lt;br /&gt;
public class MainClass&lt;br /&gt;
   Shared Sub Main()&lt;br /&gt;
      Dim form1 As Form = New Form1&lt;br /&gt;
      Application.Run(form1)&lt;br /&gt;
   End Sub&lt;br /&gt;
End Class&lt;br /&gt;
Public Class Form1&lt;br /&gt;
    Inherits System.Windows.Forms.Form&lt;br /&gt;
#Region &amp;quot; Windows Form Designer generated code &amp;quot;&lt;br /&gt;
    Public Sub New()&lt;br /&gt;
        MyBase.New()&lt;br /&gt;
        &amp;quot;This call is required by the Windows Form Designer.&lt;br /&gt;
        InitializeComponent()&lt;br /&gt;
        &amp;quot;Add any initialization after the InitializeComponent() call&lt;br /&gt;
    End Sub&lt;br /&gt;
    &amp;quot;Form overrides dispose to clean up the component list.&lt;br /&gt;
    Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean)&lt;br /&gt;
        If disposing Then&lt;br /&gt;
            If Not (components Is Nothing) Then&lt;br /&gt;
                components.Dispose()&lt;br /&gt;
            End If&lt;br /&gt;
        End If&lt;br /&gt;
        MyBase.Dispose(disposing)&lt;br /&gt;
    End Sub&lt;br /&gt;
    Friend WithEvents listBox1 As System.Windows.Forms.ListBox&lt;br /&gt;
    Friend WithEvents button1 As System.Windows.Forms.Button&lt;br /&gt;
    &amp;quot;Required by the Windows Form Designer&lt;br /&gt;
    Private components As System.ruponentModel.IContainer&lt;br /&gt;
    &amp;quot;NOTE: The following procedure is required by the Windows Form Designer&lt;br /&gt;
    &amp;quot;It can be modified using the Windows Form Designer.  &lt;br /&gt;
    &amp;quot;Do not modify it using the code editor.&lt;br /&gt;
    &amp;lt;System.Diagnostics.DebuggerStepThrough()&amp;gt; Private Sub InitializeComponent()&lt;br /&gt;
        Me.listBox1 = New System.Windows.Forms.ListBox()&lt;br /&gt;
        Me.button1 = New System.Windows.Forms.Button()&lt;br /&gt;
        Me.SuspendLayout()&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        &amp;quot;listBox1&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        Me.listBox1.Location = New System.Drawing.Point(8, 8)&lt;br /&gt;
        Me.listBox1.Name = &amp;quot;listBox1&amp;quot;&lt;br /&gt;
        Me.listBox1.Size = New System.Drawing.Size(272, 212)&lt;br /&gt;
        Me.listBox1.TabIndex = 0&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        &amp;quot;button1&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        Me.button1.Location = New System.Drawing.Point(184, 232)&lt;br /&gt;
        Me.button1.Name = &amp;quot;button1&amp;quot;&lt;br /&gt;
        Me.button1.Size = New System.Drawing.Size(96, 32)&lt;br /&gt;
        Me.button1.TabIndex = 1&lt;br /&gt;
        Me.button1.Text = &amp;quot;Clear&amp;quot;&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        &amp;quot;Form1&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        Me.AutoScaleBaseSize = New System.Drawing.Size(5, 13)&lt;br /&gt;
        Me.ClientSize = New System.Drawing.Size(292, 273)&lt;br /&gt;
        Me.Controls.AddRange(New System.Windows.Forms.Control() {Me.button1, Me.listBox1})&lt;br /&gt;
        Me.Name = &amp;quot;Form1&amp;quot;&lt;br /&gt;
        Me.Text = &amp;quot;Form1&amp;quot;&lt;br /&gt;
        Me.ResumeLayout(False)&lt;br /&gt;
    End Sub&lt;br /&gt;
    Private Sub button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles button1.Click&lt;br /&gt;
        listBox1().Items.Clear()&lt;br /&gt;
    End Sub&lt;br /&gt;
&lt;br /&gt;
    Protected Overrides Sub wndproc(ByRef m As Message)&lt;br /&gt;
        Select Case m.Msg&lt;br /&gt;
            Case &amp;amp;H20, &amp;amp;H84&lt;br /&gt;
                &amp;quot; Ignore WM_SETCURSOR, WM_NCHITTEST&lt;br /&gt;
                &amp;quot; Because there are so many of them&lt;br /&gt;
            Case Else&lt;br /&gt;
                listBox1().Items.Add(m.ToString)&lt;br /&gt;
        End Select&lt;br /&gt;
        MyBase.WndProc(m)&lt;br /&gt;
    End Sub&lt;br /&gt;
#End Region&lt;br /&gt;
End Class&lt;br /&gt;
           &lt;br /&gt;
       &amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Form and Control Click Event==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
&amp;lt;source lang=&amp;quot;vbnet&amp;quot;&amp;gt;&lt;br /&gt;
Imports System&lt;br /&gt;
Imports System.Drawing&lt;br /&gt;
Imports System.Windows.Forms&lt;br /&gt;
public class MainClass&lt;br /&gt;
   Shared Sub Main()&lt;br /&gt;
      Dim form1 As Form = New Form1&lt;br /&gt;
      Application.Run(form1)&lt;br /&gt;
   End Sub&lt;br /&gt;
End Class&lt;br /&gt;
&lt;br /&gt;
Public Class Form1&lt;br /&gt;
    Inherits System.Windows.Forms.Form&lt;br /&gt;
#Region &amp;quot; Windows Form Designer generated code &amp;quot;&lt;br /&gt;
    Public Sub New()&lt;br /&gt;
        MyBase.New()&lt;br /&gt;
        &amp;quot;This call is required by the Windows Form Designer.&lt;br /&gt;
        InitializeComponent()&lt;br /&gt;
        &amp;quot;Add any initialization after the InitializeComponent() call&lt;br /&gt;
    End Sub&lt;br /&gt;
    &amp;quot;Form overrides dispose to clean up the component list.&lt;br /&gt;
    Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean)&lt;br /&gt;
        If disposing Then&lt;br /&gt;
            If Not (components Is Nothing) Then&lt;br /&gt;
                components.Dispose()&lt;br /&gt;
            End If&lt;br /&gt;
        End If&lt;br /&gt;
        MyBase.Dispose(disposing)&lt;br /&gt;
    End Sub&lt;br /&gt;
    Friend WithEvents ctl1 As System.Windows.Forms.Control&lt;br /&gt;
    Friend WithEvents textBox1 As System.Windows.Forms.TextBox&lt;br /&gt;
    Friend WithEvents textBox2 As System.Windows.Forms.TextBox&lt;br /&gt;
    &amp;quot;Required by the Windows Form Designer&lt;br /&gt;
    Private components As System.ruponentModel.IContainer&lt;br /&gt;
    &amp;quot;NOTE: The following procedure is required by the Windows Form Designer&lt;br /&gt;
    &amp;quot;It can be modified using the Windows Form Designer.  &lt;br /&gt;
    &amp;quot;Do not modify it using the code editor.&lt;br /&gt;
    &amp;lt;System.Diagnostics.DebuggerStepThrough()&amp;gt; Private Sub InitializeComponent()&lt;br /&gt;
        Me.ctl1 = New System.Windows.Forms.Control()&lt;br /&gt;
        Me.textBox1 = New System.Windows.Forms.TextBox()&lt;br /&gt;
        Me.textBox2 = New System.Windows.Forms.TextBox()&lt;br /&gt;
        Me.ctl1.SuspendLayout()&lt;br /&gt;
        Me.SuspendLayout()&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        &amp;quot;ctl1&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        Me.ctl1.BackColor = System.Drawing.Color.Bisque&lt;br /&gt;
        Me.ctl1.Controls.AddRange(New System.Windows.Forms.Control() {Me.textBox1})&lt;br /&gt;
        Me.ctl1.Name = &amp;quot;ctl1&amp;quot;&lt;br /&gt;
        Me.ctl1.Size = New System.Drawing.Size(128, 112)&lt;br /&gt;
        Me.ctl1.TabIndex = 0&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        &amp;quot;textBox1&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        Me.textBox1.Location = New System.Drawing.Point(32, 48)&lt;br /&gt;
        Me.textBox1.Name = &amp;quot;textBox1&amp;quot;&lt;br /&gt;
        Me.textBox1.Size = New System.Drawing.Size(72, 20)&lt;br /&gt;
        Me.textBox1.TabIndex = 1&lt;br /&gt;
        Me.textBox1.Text = &amp;quot;textBox1&amp;quot;&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        &amp;quot;textBox2&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        Me.textBox2.Location = New System.Drawing.Point(24, 128)&lt;br /&gt;
        Me.textBox2.Name = &amp;quot;textBox2&amp;quot;&lt;br /&gt;
        Me.textBox2.Size = New System.Drawing.Size(96, 20)&lt;br /&gt;
        Me.textBox2.TabIndex = 1&lt;br /&gt;
        Me.textBox2.Text = &amp;quot;textBox2&amp;quot;&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        &amp;quot;Form1&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        Me.AutoScaleBaseSize = New System.Drawing.Size(5, 13)&lt;br /&gt;
        Me.ClientSize = New System.Drawing.Size(292, 273)&lt;br /&gt;
        Me.Controls.AddRange(New System.Windows.Forms.Control() {Me.textBox2, Me.ctl1})&lt;br /&gt;
        Me.Name = &amp;quot;Form1&amp;quot;&lt;br /&gt;
        Me.Text = &amp;quot;Form1&amp;quot;&lt;br /&gt;
        Me.ctl1.ResumeLayout(False)&lt;br /&gt;
        Me.ResumeLayout(False)&lt;br /&gt;
    End Sub&lt;br /&gt;
    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load&lt;br /&gt;
    End Sub&lt;br /&gt;
#End Region&lt;br /&gt;
    Private Sub Form1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles MyBase.Click&lt;br /&gt;
        Console.WriteLine(Me.ClientRectangle.ToString)&lt;br /&gt;
    End Sub&lt;br /&gt;
    Private Sub ctl1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ctl1.Click&lt;br /&gt;
        Console.WriteLine(ctl1().ClientRectangle.ToString)&lt;br /&gt;
    &lt;br /&gt;
    End Sub&lt;br /&gt;
End Class&lt;br /&gt;
           &lt;br /&gt;
       &amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Handle more than one events==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
&amp;lt;source lang=&amp;quot;vbnet&amp;quot;&amp;gt;&lt;br /&gt;
Imports System&lt;br /&gt;
Imports System.Drawing&lt;br /&gt;
Imports System.Reflection&lt;br /&gt;
Imports System.Windows.Forms&lt;br /&gt;
Imports System.IO&lt;br /&gt;
&lt;br /&gt;
public class MainClass&lt;br /&gt;
   Shared Sub Main()&lt;br /&gt;
      Dim form1 As Form = New Form1&lt;br /&gt;
      Application.Run(form1)&lt;br /&gt;
   End Sub&lt;br /&gt;
End Class&lt;br /&gt;
&lt;br /&gt;
Public Class Form1&lt;br /&gt;
    Inherits System.Windows.Forms.Form&lt;br /&gt;
#Region &amp;quot;Windows Form Designer generated code&amp;quot;&lt;br /&gt;
    Public Sub New()&lt;br /&gt;
        MyBase.New()&lt;br /&gt;
        &amp;quot;This call is required by the Windows Form Designer.&lt;br /&gt;
        InitializeComponent()&lt;br /&gt;
        &amp;quot;Add any initialization after the InitializeComponent() call&lt;br /&gt;
    End Sub&lt;br /&gt;
    &amp;quot;Form overrides dispose to clean up the component list.&lt;br /&gt;
    Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean)&lt;br /&gt;
        If disposing Then&lt;br /&gt;
            If Not (components Is Nothing) Then&lt;br /&gt;
                components.Dispose()&lt;br /&gt;
            End If&lt;br /&gt;
        End If&lt;br /&gt;
        MyBase.Dispose(disposing)&lt;br /&gt;
    End Sub&lt;br /&gt;
    Friend WithEvents MainMenu1 As System.Windows.Forms.MainMenu&lt;br /&gt;
    Friend WithEvents MenuItem1 As System.Windows.Forms.MenuItem&lt;br /&gt;
    &amp;quot;Required by the Windows Form Designer&lt;br /&gt;
    Private components As System.ruponentModel.Container&lt;br /&gt;
    &amp;quot;NOTE: The following procedure is required by the Windows Form Designer&lt;br /&gt;
    &amp;quot;It can be modified using the Windows Form Designer.  &lt;br /&gt;
    &amp;quot;Do not modify it using the code editor.&lt;br /&gt;
    Friend WithEvents Red As System.Windows.Forms.MenuItem&lt;br /&gt;
    Friend WithEvents Green As System.Windows.Forms.MenuItem&lt;br /&gt;
    Friend WithEvents Blue As System.Windows.Forms.MenuItem&lt;br /&gt;
    Friend WithEvents Yellow As System.Windows.Forms.MenuItem&lt;br /&gt;
    Friend WithEvents Black As System.Windows.Forms.MenuItem&lt;br /&gt;
    Friend WithEvents White As System.Windows.Forms.MenuItem&lt;br /&gt;
    Friend WithEvents MenuItem2 As System.Windows.Forms.MenuItem&lt;br /&gt;
    Friend WithEvents AlignLeft As System.Windows.Forms.MenuItem&lt;br /&gt;
    Friend WithEvents AlignCenter As System.Windows.Forms.MenuItem&lt;br /&gt;
    Friend WithEvents AlignRight As System.Windows.Forms.MenuItem&lt;br /&gt;
    &amp;lt;System.Diagnostics.DebuggerStepThrough()&amp;gt; Private Sub InitializeComponent()&lt;br /&gt;
        Me.MainMenu1 = New System.Windows.Forms.MainMenu()&lt;br /&gt;
        Me.MenuItem1 = New System.Windows.Forms.MenuItem()&lt;br /&gt;
        Me.Red = New System.Windows.Forms.MenuItem()&lt;br /&gt;
        Me.Green = New System.Windows.Forms.MenuItem()&lt;br /&gt;
        Me.Blue = New System.Windows.Forms.MenuItem()&lt;br /&gt;
        Me.Yellow = New System.Windows.Forms.MenuItem()&lt;br /&gt;
        Me.Black = New System.Windows.Forms.MenuItem()&lt;br /&gt;
        Me.White = New System.Windows.Forms.MenuItem()&lt;br /&gt;
        Me.MenuItem2 = New System.Windows.Forms.MenuItem()&lt;br /&gt;
        Me.AlignLeft = New System.Windows.Forms.MenuItem()&lt;br /&gt;
        Me.AlignCenter = New System.Windows.Forms.MenuItem()&lt;br /&gt;
        Me.AlignRight = New System.Windows.Forms.MenuItem()&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        &amp;quot;MainMenu1&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        Me.MainMenu1.MenuItems.AddRange(New System.Windows.Forms.MenuItem() {Me.MenuItem1, Me.MenuItem2})&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        &amp;quot;MenuItem1&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        Me.MenuItem1.Index = 0&lt;br /&gt;
        Me.MenuItem1.MenuItems.AddRange(New System.Windows.Forms.MenuItem() {Me.Red, Me.Green, Me.Blue, Me.Yellow, Me.Black, Me.White})&lt;br /&gt;
        Me.MenuItem1.Text = &amp;quot;Color&amp;quot;&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        &amp;quot;Red&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        Me.Red.Index = 0&lt;br /&gt;
        Me.Red.OwnerDraw = True&lt;br /&gt;
        Me.Red.Text = &amp;quot;&amp;quot;&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        &amp;quot;Green&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        Me.Green.Index = 1&lt;br /&gt;
        Me.Green.OwnerDraw = True&lt;br /&gt;
        Me.Green.Text = &amp;quot;&amp;quot;&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        &amp;quot;Blue&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        Me.Blue.Index = 2&lt;br /&gt;
        Me.Blue.OwnerDraw = True&lt;br /&gt;
        Me.Blue.Text = &amp;quot;&amp;quot;&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        &amp;quot;Yellow&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        Me.Yellow.Index = 3&lt;br /&gt;
        Me.Yellow.OwnerDraw = True&lt;br /&gt;
        Me.Yellow.Text = &amp;quot;&amp;quot;&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        &amp;quot;Black&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        Me.Black.Index = 4&lt;br /&gt;
        Me.Black.OwnerDraw = True&lt;br /&gt;
        Me.Black.Text = &amp;quot;&amp;quot;&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        &amp;quot;White&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        Me.White.Index = 5&lt;br /&gt;
        Me.White.OwnerDraw = True&lt;br /&gt;
        Me.White.Text = &amp;quot;&amp;quot;&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        &amp;quot;MenuItem2&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        Me.MenuItem2.Index = 1&lt;br /&gt;
        Me.MenuItem2.MenuItems.AddRange(New System.Windows.Forms.MenuItem() {Me.AlignLeft, Me.AlignCenter, Me.AlignRight})&lt;br /&gt;
        Me.MenuItem2.Text = &amp;quot;Alignment&amp;quot;&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        &amp;quot;AlignLeft&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        Me.AlignLeft.Index = 0&lt;br /&gt;
        Me.AlignLeft.OwnerDraw = True&lt;br /&gt;
        Me.AlignLeft.Text = &amp;quot;Left&amp;quot;&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        &amp;quot;AlignCenter&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        Me.AlignCenter.Index = 1&lt;br /&gt;
        Me.AlignCenter.OwnerDraw = True&lt;br /&gt;
        Me.AlignCenter.Text = &amp;quot;Center&amp;quot;&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        &amp;quot;AlignRight&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        Me.AlignRight.Index = 2&lt;br /&gt;
        Me.AlignRight.OwnerDraw = True&lt;br /&gt;
        Me.AlignRight.Text = &amp;quot;Right&amp;quot;&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        &amp;quot;Form1&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        Me.AutoScaleBaseSize = New System.Drawing.Size(5, 13)&lt;br /&gt;
        Me.ClientSize = New System.Drawing.Size(292, 129)&lt;br /&gt;
        Me.Menu = Me.MainMenu1&lt;br /&gt;
        Me.Name = &amp;quot;Form1&amp;quot;&lt;br /&gt;
        Me.Text = &amp;quot;Owner-Drawn Menu&amp;quot;&lt;br /&gt;
    End Sub&lt;br /&gt;
#End Region&lt;br /&gt;
    Dim currentFont As Font&lt;br /&gt;
    Private Sub Red_DrawItem(ByVal sender As System.Object, ByVal e As System.Windows.Forms.DrawItemEventArgs) Handles Red.DrawItem&lt;br /&gt;
        Dim R As New RectangleF(e.Bounds.X, e.Bounds.Y, e.Bounds.Width, e.Bounds.Height)&lt;br /&gt;
        e.Graphics.FillRectangle(Brushes.Red, R)&lt;br /&gt;
    End Sub&lt;br /&gt;
    Private Sub Red_MeasureItem(ByVal sender As System.Object, ByVal e As System.Windows.Forms.MeasureItemEventArgs) Handles Red.MeasureItem&lt;br /&gt;
        Dim itemSize As SizeF&lt;br /&gt;
        itemSize = New SizeF(80, 18)&lt;br /&gt;
        e.ItemHeight = itemSize.Height&lt;br /&gt;
        e.ItemWidth = itemSize.Width&lt;br /&gt;
    End Sub&lt;br /&gt;
    Private Sub Green_MeasureItem(ByVal sender As System.Object, ByVal e As System.Windows.Forms.MeasureItemEventArgs) Handles Red.MeasureItem&lt;br /&gt;
        Dim itemSize As SizeF&lt;br /&gt;
        itemSize = New SizeF(80, 18)&lt;br /&gt;
        e.ItemHeight = itemSize.Height&lt;br /&gt;
        e.ItemWidth = itemSize.Width&lt;br /&gt;
    End Sub&lt;br /&gt;
    Private Sub Green_DrawItem(ByVal sender As System.Object, ByVal e As System.Windows.Forms.DrawItemEventArgs) Handles Green.DrawItem&lt;br /&gt;
        Dim R As New RectangleF(e.Bounds.X, e.Bounds.Y, e.Bounds.Width, e.Bounds.Height)&lt;br /&gt;
        e.Graphics.FillRectangle(Brushes.Green, R)&lt;br /&gt;
    End Sub&lt;br /&gt;
    Private Sub Blue_MeasureItem(ByVal sender As System.Object, ByVal e As System.Windows.Forms.MeasureItemEventArgs) Handles Blue.MeasureItem&lt;br /&gt;
        Dim itemSize As SizeF&lt;br /&gt;
        itemSize = New SizeF(80, 18)&lt;br /&gt;
        e.ItemHeight = itemSize.Height&lt;br /&gt;
        e.ItemWidth = itemSize.Width&lt;br /&gt;
    End Sub&lt;br /&gt;
    Private Sub Blue_DrawItem(ByVal sender As System.Object, ByVal e As System.Windows.Forms.DrawItemEventArgs) Handles Blue.DrawItem&lt;br /&gt;
        Dim R As New RectangleF(e.Bounds.X, e.Bounds.Y, e.Bounds.Width, e.Bounds.Height)&lt;br /&gt;
        e.Graphics.FillRectangle(Brushes.Blue, R)&lt;br /&gt;
    End Sub&lt;br /&gt;
    Private Sub Yellow_MeasureItem(ByVal sender As System.Object, ByVal e As System.Windows.Forms.MeasureItemEventArgs) Handles Yellow.MeasureItem&lt;br /&gt;
        Dim itemSize As SizeF&lt;br /&gt;
        itemSize = New SizeF(80, 18)&lt;br /&gt;
        e.ItemHeight = itemSize.Height&lt;br /&gt;
        e.ItemWidth = itemSize.Width&lt;br /&gt;
    End Sub&lt;br /&gt;
    Private Sub Yellow_DrawItem(ByVal sender As System.Object, ByVal e As System.Windows.Forms.DrawItemEventArgs) Handles Yellow.DrawItem&lt;br /&gt;
        Dim R As New RectangleF(e.Bounds.X, e.Bounds.Y, e.Bounds.Width, e.Bounds.Height)&lt;br /&gt;
        e.Graphics.FillRectangle(Brushes.Yellow, R)&lt;br /&gt;
    End Sub&lt;br /&gt;
    Private Sub White_MeasureItem(ByVal sender As System.Object, ByVal e As System.Windows.Forms.MeasureItemEventArgs) Handles White.MeasureItem&lt;br /&gt;
        Dim itemSize As SizeF&lt;br /&gt;
        itemSize = New SizeF(80, 18)&lt;br /&gt;
        e.ItemHeight = itemSize.Height&lt;br /&gt;
        e.ItemWidth = itemSize.Width&lt;br /&gt;
    End Sub&lt;br /&gt;
    Private Sub White_DrawItem(ByVal sender As System.Object, ByVal e As System.Windows.Forms.DrawItemEventArgs) Handles White.DrawItem&lt;br /&gt;
        Dim R As New RectangleF(e.Bounds.X, e.Bounds.Y, e.Bounds.Width, e.Bounds.Height)&lt;br /&gt;
        e.Graphics.FillRectangle(Brushes.White, R)&lt;br /&gt;
    End Sub&lt;br /&gt;
    Private Sub Black_MeasureItem(ByVal sender As System.Object, ByVal e As System.Windows.Forms.MeasureItemEventArgs) Handles Black.MeasureItem&lt;br /&gt;
        Dim itemSize As SizeF&lt;br /&gt;
        itemSize = New SizeF(80, 18)&lt;br /&gt;
        e.ItemHeight = itemSize.Height&lt;br /&gt;
        e.ItemWidth = itemSize.Width&lt;br /&gt;
    End Sub&lt;br /&gt;
    Private Sub Black_DrawItem(ByVal sender As System.Object, ByVal e As System.Windows.Forms.DrawItemEventArgs) Handles Black.DrawItem&lt;br /&gt;
        Dim R As New RectangleF(e.Bounds.X, e.Bounds.Y, e.Bounds.Width, e.Bounds.Height)&lt;br /&gt;
        e.Graphics.FillRectangle(Brushes.Black, R)&lt;br /&gt;
    End Sub&lt;br /&gt;
    Private Sub AlignLeft_MeasureItem(ByVal sender As System.Object, ByVal e As System.Windows.Forms.MeasureItemEventArgs) Handles AlignLeft.MeasureItem&lt;br /&gt;
        Dim itemSize As SizeF&lt;br /&gt;
        itemSize = New SizeF(40, 14)&lt;br /&gt;
        e.ItemHeight = itemSize.Height&lt;br /&gt;
        e.ItemWidth = itemSize.Width&lt;br /&gt;
    End Sub&lt;br /&gt;
    Private Sub AlignLeft_DrawItem(ByVal sender As System.Object, ByVal e As System.Windows.Forms.DrawItemEventArgs) Handles AlignLeft.DrawItem&lt;br /&gt;
        Dim R As New RectangleF(e.Bounds.X, e.Bounds.Y, e.Bounds.Width, e.Bounds.Height)&lt;br /&gt;
        Dim strfmt As New StringFormat()&lt;br /&gt;
        strfmt.Alignment = StringAlignment.Near&lt;br /&gt;
        e.Graphics.DrawString(&amp;quot;Left&amp;quot;, Me.Font, Brushes.Black, R, strfmt)&lt;br /&gt;
    End Sub&lt;br /&gt;
    Private Sub AlignRight_MeasureItem(ByVal sender As System.Object, ByVal e As System.Windows.Forms.MeasureItemEventArgs) Handles AlignRight.MeasureItem&lt;br /&gt;
        Dim itemSize As SizeF&lt;br /&gt;
        itemSize = New SizeF(40, 14)&lt;br /&gt;
        e.ItemHeight = itemSize.Height&lt;br /&gt;
        e.ItemWidth = itemSize.Width&lt;br /&gt;
    End Sub&lt;br /&gt;
    Private Sub AlignRight_DrawItem(ByVal sender As System.Object, ByVal e As System.Windows.Forms.DrawItemEventArgs) Handles AlignRight.DrawItem&lt;br /&gt;
        Dim R As New RectangleF(e.Bounds.X, e.Bounds.Y, e.Bounds.Width, e.Bounds.Height)&lt;br /&gt;
        Dim strfmt As New StringFormat()&lt;br /&gt;
        strfmt.Alignment = StringAlignment.Far&lt;br /&gt;
        e.Graphics.DrawString(&amp;quot;Right&amp;quot;, Me.Font, Brushes.Black, R, strfmt)&lt;br /&gt;
    End Sub&lt;br /&gt;
    Private Sub AlignCenter_MeasureItem(ByVal sender As System.Object, ByVal e As System.Windows.Forms.MeasureItemEventArgs) Handles AlignCenter.MeasureItem&lt;br /&gt;
        Dim itemSize As SizeF&lt;br /&gt;
        itemSize = New SizeF(40, 14)&lt;br /&gt;
        e.ItemHeight = itemSize.Height&lt;br /&gt;
        e.ItemWidth = itemSize.Width&lt;br /&gt;
    End Sub&lt;br /&gt;
    Private Sub AlignCenter_DrawItem(ByVal sender As System.Object, ByVal e As System.Windows.Forms.DrawItemEventArgs) Handles AlignCenter.DrawItem&lt;br /&gt;
        Dim R As New RectangleF(e.Bounds.X, e.Bounds.Y, e.Bounds.Width, e.Bounds.Height)&lt;br /&gt;
        Dim strfmt As New StringFormat()&lt;br /&gt;
        strfmt.Alignment = StringAlignment.Center&lt;br /&gt;
        e.Graphics.DrawString(&amp;quot;Center&amp;quot;, Me.Font, Brushes.Black, R, strfmt)&lt;br /&gt;
    End Sub&lt;br /&gt;
&lt;br /&gt;
    Private Sub Alignment_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles AlignCenter.Click, AlignLeft.Click, AlignRight.Click,Red.Click,Green.Click,Blue.Click,Yellow.Click,Black.Click,White.Click&lt;br /&gt;
        MessageBox.Show(sender.Text)&lt;br /&gt;
    End Sub&lt;br /&gt;
End Class&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;
==Log UI event==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
&amp;lt;source lang=&amp;quot;vbnet&amp;quot;&amp;gt;&lt;br /&gt;
Imports System&lt;br /&gt;
Imports System.Windows.Forms&lt;br /&gt;
&lt;br /&gt;
Public Class MainClass&lt;br /&gt;
    &lt;br /&gt;
    Shared Sub Main()&lt;br /&gt;
        Dim form1 As Form = New Form1&lt;br /&gt;
        Application.Run(form1)&lt;br /&gt;
&lt;br /&gt;
    End Sub&lt;br /&gt;
End Class&lt;br /&gt;
Public Class Form1&lt;br /&gt;
    Inherits System.Windows.Forms.Form&lt;br /&gt;
#Region &amp;quot; Windows Form Designer generated code &amp;quot;&lt;br /&gt;
    Public Sub New()&lt;br /&gt;
        MyBase.New()&lt;br /&gt;
        &amp;quot;This call is required by the Windows Form Designer.&lt;br /&gt;
        InitializeComponent()&lt;br /&gt;
        &amp;quot;Add any initialization after the InitializeComponent() call&lt;br /&gt;
    End Sub&lt;br /&gt;
    &amp;quot;Form overrides dispose to clean up the component list.&lt;br /&gt;
    Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean)&lt;br /&gt;
        If disposing Then&lt;br /&gt;
            If Not (components Is Nothing) Then&lt;br /&gt;
                components.Dispose()&lt;br /&gt;
            End If&lt;br /&gt;
        End If&lt;br /&gt;
        MyBase.Dispose(disposing)&lt;br /&gt;
    End Sub&lt;br /&gt;
    Friend WithEvents Label1 As System.Windows.Forms.Label&lt;br /&gt;
    Friend WithEvents Label2 As System.Windows.Forms.Label&lt;br /&gt;
    Friend WithEvents txt As System.Windows.Forms.TextBox&lt;br /&gt;
    Friend WithEvents pic As System.Windows.Forms.PictureBox&lt;br /&gt;
    Friend WithEvents lstLog As System.Windows.Forms.ListBox&lt;br /&gt;
    Friend WithEvents cmd As System.Windows.Forms.Button&lt;br /&gt;
    Friend WithEvents Label3 As System.Windows.Forms.Label&lt;br /&gt;
    &amp;quot;Required by the Windows Form Designer&lt;br /&gt;
    Private components As System.ruponentModel.Container&lt;br /&gt;
    &amp;quot;NOTE: The following procedure is required by the Windows Form Designer&lt;br /&gt;
    &amp;quot;It can be modified using the Windows Form Designer.  &lt;br /&gt;
    &amp;quot;Do not modify it using the code editor.&lt;br /&gt;
    Friend WithEvents GroupBox1 As System.Windows.Forms.GroupBox&lt;br /&gt;
    Friend WithEvents Label4 As System.Windows.Forms.Label&lt;br /&gt;
    &amp;lt;System.Diagnostics.DebuggerStepThrough()&amp;gt; Private Sub InitializeComponent()&lt;br /&gt;
        Me.txt = New System.Windows.Forms.TextBox()&lt;br /&gt;
        Me.Label1 = New System.Windows.Forms.Label()&lt;br /&gt;
        Me.Label2 = New System.Windows.Forms.Label()&lt;br /&gt;
        Me.lstLog = New System.Windows.Forms.ListBox()&lt;br /&gt;
        Me.pic = New System.Windows.Forms.PictureBox()&lt;br /&gt;
        Me.cmd = New System.Windows.Forms.Button()&lt;br /&gt;
        Me.Label3 = New System.Windows.Forms.Label()&lt;br /&gt;
        Me.GroupBox1 = New System.Windows.Forms.GroupBox()&lt;br /&gt;
        Me.Label4 = New System.Windows.Forms.Label()&lt;br /&gt;
        Me.GroupBox1.SuspendLayout()&lt;br /&gt;
        Me.SuspendLayout()&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        &amp;quot;txt&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        Me.txt.Location = New System.Drawing.Point(156, 20)&lt;br /&gt;
        Me.txt.Name = &amp;quot;txt&amp;quot;&lt;br /&gt;
        Me.txt.Size = New System.Drawing.Size(192, 21)&lt;br /&gt;
        Me.txt.TabIndex = 1&lt;br /&gt;
        Me.txt.Text = &amp;quot;&amp;quot;&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        &amp;quot;Label1&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        Me.Label1.Location = New System.Drawing.Point(6, 24)&lt;br /&gt;
        Me.Label1.Name = &amp;quot;Label1&amp;quot;&lt;br /&gt;
        Me.Label1.Size = New System.Drawing.Size(144, 16)&lt;br /&gt;
        Me.Label1.TabIndex = 2&lt;br /&gt;
        Me.Label1.Text = &amp;quot;Test keyboard events here:&amp;quot;&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        &amp;quot;Label2&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        Me.Label2.Location = New System.Drawing.Point(20, 52)&lt;br /&gt;
        Me.Label2.Name = &amp;quot;Label2&amp;quot;&lt;br /&gt;
        Me.Label2.Size = New System.Drawing.Size(128, 16)&lt;br /&gt;
        Me.Label2.TabIndex = 2&lt;br /&gt;
        Me.Label2.Text = &amp;quot;Test mouse events here:&amp;quot;&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        &amp;quot;lstLog&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        Me.lstLog.Anchor = (((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Bottom) _&lt;br /&gt;
                    Or System.Windows.Forms.AnchorStyles.Left) _&lt;br /&gt;
                    Or System.Windows.Forms.AnchorStyles.Right)&lt;br /&gt;
        Me.lstLog.IntegralHeight = False&lt;br /&gt;
        Me.lstLog.Location = New System.Drawing.Point(8, 160)&lt;br /&gt;
        Me.lstLog.Name = &amp;quot;lstLog&amp;quot;&lt;br /&gt;
        Me.lstLog.Size = New System.Drawing.Size(384, 212)&lt;br /&gt;
        Me.lstLog.TabIndex = 0&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        &amp;quot;pic&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        Me.pic.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D&lt;br /&gt;
        Me.pic.Location = New System.Drawing.Point(156, 48)&lt;br /&gt;
        Me.pic.Name = &amp;quot;pic&amp;quot;&lt;br /&gt;
        Me.pic.Size = New System.Drawing.Size(192, 48)&lt;br /&gt;
        Me.pic.TabIndex = 3&lt;br /&gt;
        Me.pic.TabStop = False&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        &amp;quot;cmd&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        Me.cmd.FlatStyle = System.Windows.Forms.FlatStyle.System&lt;br /&gt;
        Me.cmd.Location = New System.Drawing.Point(156, 100)&lt;br /&gt;
        Me.cmd.Name = &amp;quot;cmd&amp;quot;&lt;br /&gt;
        Me.cmd.Size = New System.Drawing.Size(88, 28)&lt;br /&gt;
        Me.cmd.TabIndex = 4&lt;br /&gt;
        Me.cmd.Text = &amp;quot;Button1&amp;quot;&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        &amp;quot;Label3&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        Me.Label3.Location = New System.Drawing.Point(24, 104)&lt;br /&gt;
        Me.Label3.Name = &amp;quot;Label3&amp;quot;&lt;br /&gt;
        Me.Label3.Size = New System.Drawing.Size(64, 24)&lt;br /&gt;
        Me.Label3.TabIndex = 5&lt;br /&gt;
        Me.Label3.Text = &amp;quot;Label3&amp;quot;&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        &amp;quot;GroupBox1&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        Me.GroupBox1.Anchor = ((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Left) _&lt;br /&gt;
                    Or System.Windows.Forms.AnchorStyles.Right)&lt;br /&gt;
        Me.GroupBox1.Controls.AddRange(New System.Windows.Forms.Control() {Me.Label4, Me.Label1, Me.pic, Me.txt, Me.cmd, Me.Label2})&lt;br /&gt;
        Me.GroupBox1.FlatStyle = System.Windows.Forms.FlatStyle.System&lt;br /&gt;
        Me.GroupBox1.Location = New System.Drawing.Point(8, 4)&lt;br /&gt;
        Me.GroupBox1.Name = &amp;quot;GroupBox1&amp;quot;&lt;br /&gt;
        Me.GroupBox1.Size = New System.Drawing.Size(384, 148)&lt;br /&gt;
        Me.GroupBox1.TabIndex = 6&lt;br /&gt;
        Me.GroupBox1.TabStop = False&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        &amp;quot;Label4&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        Me.Label4.Location = New System.Drawing.Point(92, 108)&lt;br /&gt;
        Me.Label4.Name = &amp;quot;Label4&amp;quot;&lt;br /&gt;
        Me.Label4.Size = New System.Drawing.Size(56, 16)&lt;br /&gt;
        Me.Label4.TabIndex = 5&lt;br /&gt;
        Me.Label4.Text = &amp;quot;And here:&amp;quot;&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        &amp;quot;Form1&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        Me.AutoScaleBaseSize = New System.Drawing.Size(5, 14)&lt;br /&gt;
        Me.ClientSize = New System.Drawing.Size(400, 378)&lt;br /&gt;
        Me.Controls.AddRange(New System.Windows.Forms.Control() {Me.GroupBox1, Me.Label3, Me.lstLog})&lt;br /&gt;
        Me.Font = New System.Drawing.Font(&amp;quot;Tahoma&amp;quot;, 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))&lt;br /&gt;
        Me.Name = &amp;quot;Form1&amp;quot;&lt;br /&gt;
        Me.Text = &amp;quot;Event Tracker&amp;quot;&lt;br /&gt;
        Me.GroupBox1.ResumeLayout(False)&lt;br /&gt;
        Me.ResumeLayout(False)&lt;br /&gt;
    End Sub&lt;br /&gt;
#End Region&lt;br /&gt;
&lt;br /&gt;
    Private Sub txt_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles txt.KeyDown&lt;br /&gt;
        AddEventToListBox(&amp;quot;Key Down: &amp;quot; &amp;amp; e.KeyCode &amp;amp; e.KeyValue)&lt;br /&gt;
    End Sub&lt;br /&gt;
    Private Sub txt_KeyUp(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles txt.KeyUp&lt;br /&gt;
        AddEventToListBox(&amp;quot;Key Up: &amp;quot; &amp;amp; e.KeyCode &amp;amp; e.KeyValue &amp;amp; &amp;quot; Text is: &amp;quot; &amp;amp; txt.Text)&lt;br /&gt;
    End Sub&lt;br /&gt;
    Private Sub txt_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles txt.TextChanged&lt;br /&gt;
        AddEventToListBox(&amp;quot;Changed: &amp;quot; &amp;amp; &amp;quot; Text is: &amp;quot; &amp;amp; txt.Text)&lt;br /&gt;
    End Sub&lt;br /&gt;
&lt;br /&gt;
    Private Sub txt_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles txt.KeyPress&lt;br /&gt;
        AddEventToListBox(&amp;quot;Key Press: &amp;quot; &amp;amp; e.KeyChar)&lt;br /&gt;
    End Sub&lt;br /&gt;
    Private Sub pic_MouseEnter(ByVal sender As Object, ByVal e As System.EventArgs) Handles pic.MouseEnter, cmd.MouseEnter&lt;br /&gt;
        AddEventToListBox(&amp;quot;Mouse Enter&amp;quot;)&lt;br /&gt;
    End Sub&lt;br /&gt;
    Private Sub pic_MouseMove(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles pic.MouseMove&lt;br /&gt;
        AddEventToListBox(&amp;quot;Mouse Move: &amp;quot;) &lt;br /&gt;
    End Sub&lt;br /&gt;
    Private Sub pic_MouseHover(ByVal sender As Object, ByVal e As System.EventArgs) Handles pic.MouseHover, cmd.MouseHover&lt;br /&gt;
        AddEventToListBox(&amp;quot;Mouse Hover&amp;quot;)&lt;br /&gt;
    End Sub&lt;br /&gt;
    Private Sub pic_MouseDown(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles pic.MouseDown, cmd.MouseDown&lt;br /&gt;
        AddEventToListBox(&amp;quot;Mouse Down: X=&amp;quot; &amp;amp; e.X &amp;amp; &amp;quot;Y=&amp;quot; &amp;amp; e.Y &amp;amp; &amp;quot; Button=&amp;quot; &amp;amp; e.Button.ToString)&lt;br /&gt;
    End Sub&lt;br /&gt;
    Private Sub pic_MouseUp(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles pic.MouseUp, cmd.MouseUp&lt;br /&gt;
        AddEventToListBox(&amp;quot;Mouse Up: X=&amp;quot; &amp;amp; e.X &amp;amp; &amp;quot;Y=&amp;quot; &amp;amp; e.Y &amp;amp; &amp;quot; Button=&amp;quot; &amp;amp; e.Button.ToString)&lt;br /&gt;
    End Sub&lt;br /&gt;
    Private Sub pic_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles pic.Click, cmd.Click&lt;br /&gt;
        AddEventToListBox(&amp;quot;Click&amp;quot;)&lt;br /&gt;
    End Sub&lt;br /&gt;
    Private Sub pic_DoubleClick(ByVal sender As Object, ByVal e As System.EventArgs) Handles pic.DoubleClick&lt;br /&gt;
        AddEventToListBox(&amp;quot;Double Click&amp;quot;)&lt;br /&gt;
    End Sub&lt;br /&gt;
    Private Sub pic_MouseLeave(ByVal sender As Object, ByVal e As System.EventArgs) Handles pic.MouseLeave&lt;br /&gt;
        AddEventToListBox(&amp;quot;Mouse Leave&amp;quot;)&lt;br /&gt;
    End Sub&lt;br /&gt;
&lt;br /&gt;
    Private Sub AddEventToListBox(ByVal data As String)&lt;br /&gt;
        lstLog.Items.Add(data)&lt;br /&gt;
    End Sub&lt;br /&gt;
End Class&lt;br /&gt;
           &lt;br /&gt;
       &amp;lt;/source&amp;gt;&lt;/div&gt;</summary>
		<author><name>Admin</name></author>	</entry>

	</feed>