<?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_Tutorial%2FGUI%2FLabel</id>
		<title>VB.Net Tutorial/GUI/Label - История изменений</title>
		<link rel="self" type="application/atom+xml" href="http://www.vbex.ru/index.php?action=history&amp;feed=atom&amp;title=VB.Net_Tutorial%2FGUI%2FLabel"/>
		<link rel="alternate" type="text/html" href="http://www.vbex.ru/index.php?title=VB.Net_Tutorial/GUI/Label&amp;action=history"/>
		<updated>2026-04-05T13:12:58Z</updated>
		<subtitle>История изменений этой страницы в вики</subtitle>
		<generator>MediaWiki 1.30.0</generator>

	<entry>
		<id>http://www.vbex.ru/index.php?title=VB.Net_Tutorial/GUI/Label&amp;diff=3842&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_Tutorial/GUI/Label&amp;diff=3842&amp;oldid=prev"/>
				<updated>2010-05-26T16:40:30Z</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_Tutorial/GUI/Label&amp;diff=3843&amp;oldid=prev</id>
		<title>Admin: 1 версия</title>
		<link rel="alternate" type="text/html" href="http://www.vbex.ru/index.php?title=VB.Net_Tutorial/GUI/Label&amp;diff=3843&amp;oldid=prev"/>
				<updated>2010-05-26T12:57:05Z</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 image to Label==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
&amp;lt;source lang=&amp;quot;vbnet&amp;quot;&amp;gt;imports System&lt;br /&gt;
imports System.Drawing&lt;br /&gt;
imports System.Windows.Forms&lt;br /&gt;
public class LabelImage: inherits Form&lt;br /&gt;
  public sub New()&lt;br /&gt;
    Size = new Size(300,250)&lt;br /&gt;
    dim img as Image = Image.FromFile(&amp;quot;yourfile.jpg&amp;quot;)&lt;br /&gt;
    dim lblImage as Label = new Label()&lt;br /&gt;
    lblImage.Parent = me&lt;br /&gt;
    lblImage.Location = new Point(0, 0)&lt;br /&gt;
    lblImage.Image = img&lt;br /&gt;
    lblImage.Anchor = AnchorStyles.Top or AnchorStyles.Right&lt;br /&gt;
    lblImage.Size = new Size(img.Width, img.Height)&lt;br /&gt;
  end sub&lt;br /&gt;
  public shared sub Main() &lt;br /&gt;
    Application.Run(new LabelImage())&lt;br /&gt;
  end sub&lt;br /&gt;
end class&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Change Label font==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
&amp;lt;source lang=&amp;quot;vbnet&amp;quot;&amp;gt;Imports System.Windows.Forms&lt;br /&gt;
Imports System.Drawing&lt;br /&gt;
Imports System.Drawing.Drawing2D&lt;br /&gt;
public class CheckBoxEvent&lt;br /&gt;
   public Shared Sub Main&lt;br /&gt;
        Application.Run(New FrmCheckBox)&lt;br /&gt;
   End Sub&lt;br /&gt;
End class&lt;br /&gt;
&lt;br /&gt;
Public Class FrmCheckBox&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 chkItalic As System.Windows.Forms.CheckBox&lt;br /&gt;
   Friend WithEvents lblOutput As System.Windows.Forms.Label&lt;br /&gt;
   Friend WithEvents chkBold As System.Windows.Forms.CheckBox&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;
   &amp;lt;System.Diagnostics.DebuggerStepThrough()&amp;gt; Private Sub InitializeComponent()&lt;br /&gt;
      Me.lblOutput = New System.Windows.Forms.Label()&lt;br /&gt;
      Me.chkItalic = New System.Windows.Forms.CheckBox()&lt;br /&gt;
      Me.chkBold = New System.Windows.Forms.CheckBox()&lt;br /&gt;
      Me.SuspendLayout()&lt;br /&gt;
      &amp;quot;&lt;br /&gt;
      &amp;quot;lblOutput&lt;br /&gt;
      &amp;quot;&lt;br /&gt;
      Me.lblOutput.Font = New System.Drawing.Font(&amp;quot;Microsoft Sans Serif&amp;quot;, 11.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))&lt;br /&gt;
      Me.lblOutput.Location = New System.Drawing.Point(48, 24)&lt;br /&gt;
      Me.lblOutput.Name = &amp;quot;lblOutput&amp;quot;&lt;br /&gt;
      Me.lblOutput.Size = New System.Drawing.Size(208, 24)&lt;br /&gt;
      Me.lblOutput.TabIndex = 0&lt;br /&gt;
      Me.lblOutput.Text = &amp;quot;Watch the font style change&amp;quot;&lt;br /&gt;
      &amp;quot;&lt;br /&gt;
      &amp;quot;chkItalic&lt;br /&gt;
      &amp;quot;&lt;br /&gt;
      Me.chkItalic.Font = New System.Drawing.Font(&amp;quot;Microsoft Sans Serif&amp;quot;, 9.75!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))&lt;br /&gt;
      Me.chkItalic.Location = New System.Drawing.Point(152, 64)&lt;br /&gt;
      Me.chkItalic.Name = &amp;quot;chkItalic&amp;quot;&lt;br /&gt;
      Me.chkItalic.Size = New System.Drawing.Size(64, 24)&lt;br /&gt;
      Me.chkItalic.TabIndex = 2&lt;br /&gt;
      Me.chkItalic.Text = &amp;quot;Italic&amp;quot;&lt;br /&gt;
      &amp;quot;&lt;br /&gt;
      &amp;quot;chkBold&lt;br /&gt;
      &amp;quot;&lt;br /&gt;
      Me.chkBold.Font = New System.Drawing.Font(&amp;quot;Microsoft Sans Serif&amp;quot;, 9.75!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))&lt;br /&gt;
      Me.chkBold.Location = New System.Drawing.Point(80, 64)&lt;br /&gt;
      Me.chkBold.Name = &amp;quot;chkBold&amp;quot;&lt;br /&gt;
      Me.chkBold.Size = New System.Drawing.Size(56, 24)&lt;br /&gt;
      Me.chkBold.TabIndex = 1&lt;br /&gt;
      Me.chkBold.Text = &amp;quot;Bold&amp;quot;&lt;br /&gt;
      &amp;quot;&lt;br /&gt;
      &amp;quot;FrmCheckBox&lt;br /&gt;
      &amp;quot;&lt;br /&gt;
      Me.AutoScaleBaseSize = New System.Drawing.Size(6, 14)&lt;br /&gt;
      Me.ClientSize = New System.Drawing.Size(292, 117)&lt;br /&gt;
      Me.Controls.AddRange(New System.Windows.Forms.Control() {Me.chkItalic, Me.chkBold, Me.lblOutput})&lt;br /&gt;
      Me.Font = New System.Drawing.Font(&amp;quot;Microsoft Sans Serif&amp;quot;, 9!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))&lt;br /&gt;
      Me.Name = &amp;quot;FrmCheckBox&amp;quot;&lt;br /&gt;
      Me.Text = &amp;quot;CheckBoxTest&amp;quot;&lt;br /&gt;
      Me.ResumeLayout(False)&lt;br /&gt;
   End Sub&lt;br /&gt;
#End Region&lt;br /&gt;
   Private Sub chkItalic_CheckedChanged _&lt;br /&gt;
      (ByVal sender As System.Object, ByVal e As System.EventArgs) _&lt;br /&gt;
      Handles chkItalic.CheckedChanged&lt;br /&gt;
      lblOutput.Font = New Font(&amp;quot;Microsoft Sans Serif&amp;quot;, _&lt;br /&gt;
         lblOutput.Font.Size, lblOutput.Font.Style Xor FontStyle.Italic)&lt;br /&gt;
   End Sub &lt;br /&gt;
   Private Sub chkBold_CheckedChanged _&lt;br /&gt;
      (ByVal sender As System.Object, ByVal e As System.EventArgs) _&lt;br /&gt;
      Handles chkBold.CheckedChanged&lt;br /&gt;
      lblOutput.Font = New Font(&amp;quot;Microsoft Sans Serif&amp;quot;, _&lt;br /&gt;
         lblOutput.Font.Size, lblOutput.Font.Style Xor FontStyle.Bold)&lt;br /&gt;
   End Sub &lt;br /&gt;
End Class&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Change Label text and width in Button action==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
&amp;lt;source lang=&amp;quot;vbnet&amp;quot;&amp;gt;Imports System.Windows.Forms&lt;br /&gt;
public class LabelWidthTextSettingInButtonAction&lt;br /&gt;
   public Shared Sub Main&lt;br /&gt;
        Application.Run(New frmFirstProgram)&lt;br /&gt;
   End Sub&lt;br /&gt;
End class&lt;br /&gt;
Public Class frmFirstProgram&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;
  &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;
  Friend WithEvents lblName As System.Windows.Forms.Label&lt;br /&gt;
  Friend WithEvents btnChange As System.Windows.Forms.Button&lt;br /&gt;
  Friend WithEvents btnExit As System.Windows.Forms.Button&lt;br /&gt;
  &amp;lt;System.Diagnostics.DebuggerStepThrough()&amp;gt; Private Sub InitializeComponent()&lt;br /&gt;
    Me.lblName = New System.Windows.Forms.Label()&lt;br /&gt;
    Me.btnChange = New System.Windows.Forms.Button()&lt;br /&gt;
    Me.btnExit = New System.Windows.Forms.Button()&lt;br /&gt;
    Me.SuspendLayout()&lt;br /&gt;
    &amp;quot;&lt;br /&gt;
    &amp;quot;lblName&lt;br /&gt;
    &amp;quot;&lt;br /&gt;
    Me.lblName.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D&lt;br /&gt;
    Me.lblName.Location = New System.Drawing.Point(16, 16)&lt;br /&gt;
    Me.lblName.Name = &amp;quot;lblName&amp;quot;&lt;br /&gt;
    Me.lblName.Size = New System.Drawing.Size(104, 24)&lt;br /&gt;
    Me.lblName.TabIndex = 0&lt;br /&gt;
    Me.lblName.Text = &amp;quot;test&amp;quot;&lt;br /&gt;
    Me.lblName.TextAlign = System.Drawing.ContentAlignment.MiddleCenter&lt;br /&gt;
    &amp;quot;&lt;br /&gt;
    &amp;quot;btnChange&lt;br /&gt;
    &amp;quot;&lt;br /&gt;
    Me.btnChange.Font = New System.Drawing.Font(&amp;quot;Microsoft Sans Serif&amp;quot;, 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))&lt;br /&gt;
    Me.btnChange.Location = New System.Drawing.Point(16, 176)&lt;br /&gt;
    Me.btnChange.Name = &amp;quot;btnChange&amp;quot;&lt;br /&gt;
    Me.btnChange.TabIndex = 1&lt;br /&gt;
    Me.btnChange.Text = &amp;quot;&amp;amp;Change&amp;quot;&lt;br /&gt;
    &amp;quot;&lt;br /&gt;
    &amp;quot;btnExit&lt;br /&gt;
    &amp;quot;&lt;br /&gt;
    Me.btnExit.Font = New System.Drawing.Font(&amp;quot;Microsoft Sans Serif&amp;quot;, 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))&lt;br /&gt;
    Me.btnExit.Location = New System.Drawing.Point(176, 176)&lt;br /&gt;
    Me.btnExit.Name = &amp;quot;btnExit&amp;quot;&lt;br /&gt;
    Me.btnExit.TabIndex = 2&lt;br /&gt;
    Me.btnExit.Text = &amp;quot;E&amp;amp;xit&amp;quot;&lt;br /&gt;
    &amp;quot;&lt;br /&gt;
    &amp;quot;frmFirstProgram&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.btnExit, Me.btnChange, Me.lblName})&lt;br /&gt;
    Me.Name = &amp;quot;frmFirstProgram&amp;quot;&lt;br /&gt;
    Me.Text = &amp;quot;My First Program&amp;quot;&lt;br /&gt;
    Me.ResumeLayout(False)&lt;br /&gt;
  End Sub&lt;br /&gt;
#End Region&lt;br /&gt;
  Private Sub btnChange_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnChange.Click&lt;br /&gt;
    lblName.Width = 200&lt;br /&gt;
    lblName.Text = &amp;quot;Some text&amp;quot;&lt;br /&gt;
  End Sub&lt;br /&gt;
  Private Sub btnExit_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnExit.Click&lt;br /&gt;
    frmFirstProgram.ActiveForm.Dispose()&lt;br /&gt;
  End Sub&lt;br /&gt;
End Class&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Label mouse click event==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
&amp;lt;source lang=&amp;quot;vbnet&amp;quot;&amp;gt;Imports System.Windows.Forms&lt;br /&gt;
public class GenericEventHandler&lt;br /&gt;
   public Shared Sub Main&lt;br /&gt;
        Application.Run(New FrmSimple)&lt;br /&gt;
   End Sub&lt;br /&gt;
End class&lt;br /&gt;
&lt;br /&gt;
Public Class FrmSimple&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;
&lt;br /&gt;
      &amp;quot; Add any initialization after the &lt;br /&gt;
      &amp;quot; InitializeComponent() call&lt;br /&gt;
   End Sub &amp;quot; New&lt;br /&gt;
   &amp;quot; Form overrides dispose to clean up the component list.&lt;br /&gt;
   Protected Overloads Overrides Sub Dispose( _&lt;br /&gt;
      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 &amp;quot; Dispose&lt;br /&gt;
   Friend WithEvents lblOutput 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 &lt;br /&gt;
   &amp;quot; 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; _&lt;br /&gt;
      Private Sub InitializeComponent()&lt;br /&gt;
      Me.lblOutput = New System.Windows.Forms.Label()&lt;br /&gt;
      Me.SuspendLayout()&lt;br /&gt;
      &amp;quot;&lt;br /&gt;
      &amp;quot;lblOutput&lt;br /&gt;
      &amp;quot;&lt;br /&gt;
      Me.lblOutput.Location = New System.Drawing.Point(16, 16)&lt;br /&gt;
      Me.lblOutput.Name = &amp;quot;lblOutput&amp;quot;&lt;br /&gt;
      Me.lblOutput.Size = New System.Drawing.Size(152, 80)&lt;br /&gt;
      Me.lblOutput.TabIndex = 0&lt;br /&gt;
      Me.lblOutput.Text = &amp;quot;Click Me!&amp;quot;&lt;br /&gt;
      Me.lblOutput.TextAlign = System.Drawing.ContentAlignment.MiddleCenter&lt;br /&gt;
      &amp;quot;&lt;br /&gt;
      &amp;quot;FrmSimple&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(176, 101)&lt;br /&gt;
      Me.Controls.AddRange(New System.Windows.Forms.Control() {Me.lblOutput})&lt;br /&gt;
      Me.Name = &amp;quot;FrmSimple&amp;quot;&lt;br /&gt;
      Me.Text = &amp;quot;SimpleEventExample&amp;quot;&lt;br /&gt;
      Me.ResumeLayout(False)&lt;br /&gt;
   End Sub&lt;br /&gt;
#End Region&lt;br /&gt;
   Private Sub lblOutput_Click(ByVal sender As Object, _&lt;br /&gt;
      ByVal e As System.EventArgs) Handles lblOutput.Click&lt;br /&gt;
      MessageBox.Show(&amp;quot;Label was clicked&amp;quot;)&lt;br /&gt;
   End Sub &lt;br /&gt;
End Class&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Label TextAlign==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
&amp;lt;source lang=&amp;quot;vbnet&amp;quot;&amp;gt;Imports System.Drawing&lt;br /&gt;
Imports System.Drawing.Drawing2D&lt;br /&gt;
Imports System.Windows.Forms&lt;br /&gt;
public class TextAlignLabel&lt;br /&gt;
   public Shared Sub Main&lt;br /&gt;
        Application.Run(New 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;
    &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;
    Friend WithEvents Label1 As System.Windows.Forms.Label&lt;br /&gt;
    Friend WithEvents Label2 As System.Windows.Forms.Label&lt;br /&gt;
    Friend WithEvents Label3 As System.Windows.Forms.Label&lt;br /&gt;
    Friend WithEvents Label4 As System.Windows.Forms.Label&lt;br /&gt;
    Friend WithEvents Label5 As System.Windows.Forms.Label&lt;br /&gt;
    Friend WithEvents Label6 As System.Windows.Forms.Label&lt;br /&gt;
    Friend WithEvents Label7 As System.Windows.Forms.Label&lt;br /&gt;
    Friend WithEvents Label8 As System.Windows.Forms.Label&lt;br /&gt;
    Friend WithEvents Label9 As System.Windows.Forms.Label&lt;br /&gt;
    Friend WithEvents Label10 As System.Windows.Forms.Label&lt;br /&gt;
    &amp;lt;System.Diagnostics.DebuggerStepThrough()&amp;gt; Private Sub InitializeComponent()&lt;br /&gt;
        Me.Label1 = New System.Windows.Forms.Label&lt;br /&gt;
        Me.Label2 = New System.Windows.Forms.Label&lt;br /&gt;
        Me.Label3 = New System.Windows.Forms.Label&lt;br /&gt;
        Me.Label4 = New System.Windows.Forms.Label&lt;br /&gt;
        Me.Label5 = New System.Windows.Forms.Label&lt;br /&gt;
        Me.Label6 = New System.Windows.Forms.Label&lt;br /&gt;
        Me.Label7 = New System.Windows.Forms.Label&lt;br /&gt;
        Me.Label8 = New System.Windows.Forms.Label&lt;br /&gt;
        Me.Label9 = New System.Windows.Forms.Label&lt;br /&gt;
        Me.Label10 = New System.Windows.Forms.Label&lt;br /&gt;
        Me.SuspendLayout()&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        &amp;quot;Label1&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        Me.Label1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle&lt;br /&gt;
        Me.Label1.Location = New System.Drawing.Point(16, 56)&lt;br /&gt;
        Me.Label1.Name = &amp;quot;Label1&amp;quot;&lt;br /&gt;
        Me.Label1.TabIndex = 0&lt;br /&gt;
        Me.Label1.Text = &amp;quot;Label1&amp;quot;&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        &amp;quot;Label2&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        Me.Label2.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle&lt;br /&gt;
        Me.Label2.Location = New System.Drawing.Point(136, 56)&lt;br /&gt;
        Me.Label2.Name = &amp;quot;Label2&amp;quot;&lt;br /&gt;
        Me.Label2.TabIndex = 1&lt;br /&gt;
        Me.Label2.Text = &amp;quot;Label2&amp;quot;&lt;br /&gt;
        Me.Label2.TextAlign = System.Drawing.ContentAlignment.TopCenter&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        &amp;quot;Label3&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        Me.Label3.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle&lt;br /&gt;
        Me.Label3.Location = New System.Drawing.Point(256, 56)&lt;br /&gt;
        Me.Label3.Name = &amp;quot;Label3&amp;quot;&lt;br /&gt;
        Me.Label3.TabIndex = 2&lt;br /&gt;
        Me.Label3.Text = &amp;quot;Label3&amp;quot;&lt;br /&gt;
        Me.Label3.TextAlign = System.Drawing.ContentAlignment.TopRight&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        &amp;quot;Label4&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        Me.Label4.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle&lt;br /&gt;
        Me.Label4.Location = New System.Drawing.Point(16, 112)&lt;br /&gt;
        Me.Label4.Name = &amp;quot;Label4&amp;quot;&lt;br /&gt;
        Me.Label4.TabIndex = 3&lt;br /&gt;
        Me.Label4.Text = &amp;quot;Label4&amp;quot;&lt;br /&gt;
        Me.Label4.TextAlign = System.Drawing.ContentAlignment.MiddleLeft&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        &amp;quot;Label5&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        Me.Label5.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle&lt;br /&gt;
        Me.Label5.Location = New System.Drawing.Point(136, 112)&lt;br /&gt;
        Me.Label5.Name = &amp;quot;Label5&amp;quot;&lt;br /&gt;
        Me.Label5.TabIndex = 4&lt;br /&gt;
        Me.Label5.Text = &amp;quot;Label5&amp;quot;&lt;br /&gt;
        Me.Label5.TextAlign = System.Drawing.ContentAlignment.MiddleCenter&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        &amp;quot;Label6&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        Me.Label6.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle&lt;br /&gt;
        Me.Label6.Location = New System.Drawing.Point(256, 112)&lt;br /&gt;
        Me.Label6.Name = &amp;quot;Label6&amp;quot;&lt;br /&gt;
        Me.Label6.TabIndex = 5&lt;br /&gt;
        Me.Label6.Text = &amp;quot;Label6&amp;quot;&lt;br /&gt;
        Me.Label6.TextAlign = System.Drawing.ContentAlignment.MiddleRight&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        &amp;quot;Label7&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        Me.Label7.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle&lt;br /&gt;
        Me.Label7.Location = New System.Drawing.Point(16, 168)&lt;br /&gt;
        Me.Label7.Name = &amp;quot;Label7&amp;quot;&lt;br /&gt;
        Me.Label7.TabIndex = 6&lt;br /&gt;
        Me.Label7.Text = &amp;quot;Label7&amp;quot;&lt;br /&gt;
        Me.Label7.TextAlign = System.Drawing.ContentAlignment.BottomLeft&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        &amp;quot;Label8&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        Me.Label8.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle&lt;br /&gt;
        Me.Label8.Location = New System.Drawing.Point(136, 168)&lt;br /&gt;
        Me.Label8.Name = &amp;quot;Label8&amp;quot;&lt;br /&gt;
        Me.Label8.TabIndex = 7&lt;br /&gt;
        Me.Label8.Text = &amp;quot;Label8&amp;quot;&lt;br /&gt;
        Me.Label8.TextAlign = System.Drawing.ContentAlignment.BottomCenter&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        &amp;quot;Label9&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        Me.Label9.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle&lt;br /&gt;
        Me.Label9.Location = New System.Drawing.Point(256, 168)&lt;br /&gt;
        Me.Label9.Name = &amp;quot;Label9&amp;quot;&lt;br /&gt;
        Me.Label9.TabIndex = 8&lt;br /&gt;
        Me.Label9.Text = &amp;quot;Label9&amp;quot;&lt;br /&gt;
        Me.Label9.TextAlign = System.Drawing.ContentAlignment.BottomRight&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        &amp;quot;Label10&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        Me.Label10.Font = New System.Drawing.Font(&amp;quot;Microsoft Sans Serif&amp;quot;, 24.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))&lt;br /&gt;
        Me.Label10.Location = New System.Drawing.Point(0, 0)&lt;br /&gt;
        Me.Label10.Name = &amp;quot;Label10&amp;quot;&lt;br /&gt;
        Me.Label10.Size = New System.Drawing.Size(192, 48)&lt;br /&gt;
        Me.Label10.TabIndex = 9&lt;br /&gt;
        Me.Label10.Text = &amp;quot;Labels&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(376, 229)&lt;br /&gt;
        Me.Controls.Add(Me.Label10)&lt;br /&gt;
        Me.Controls.Add(Me.Label9)&lt;br /&gt;
        Me.Controls.Add(Me.Label8)&lt;br /&gt;
        Me.Controls.Add(Me.Label7)&lt;br /&gt;
        Me.Controls.Add(Me.Label6)&lt;br /&gt;
        Me.Controls.Add(Me.Label5)&lt;br /&gt;
        Me.Controls.Add(Me.Label4)&lt;br /&gt;
        Me.Controls.Add(Me.Label3)&lt;br /&gt;
        Me.Controls.Add(Me.Label2)&lt;br /&gt;
        Me.Controls.Add(Me.Label1)&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;
#End Region&lt;br /&gt;
End Class&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Multiline Label==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
&amp;lt;source lang=&amp;quot;vbnet&amp;quot;&amp;gt;Imports System.Windows.Forms&lt;br /&gt;
public class MultilineLabel&lt;br /&gt;
   public Shared Sub Main&lt;br /&gt;
        Application.Run(New Form1)&lt;br /&gt;
   End Sub&lt;br /&gt;
End class&lt;br /&gt;
Public Class Form1&lt;br /&gt;
    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load&lt;br /&gt;
        lblInstructions.Text = &amp;quot;Print this message and either:&amp;quot; &amp;amp; vbCrLf &amp;amp; _&lt;br /&gt;
    &amp;quot;    - Mail it to the recipient&amp;quot; &amp;amp; vbCrLf &amp;amp; _&lt;br /&gt;
    &amp;quot;    - Fax it to the recipient&amp;quot; &amp;amp; vbCrLf &amp;amp; _&lt;br /&gt;
    &amp;quot;    - Throw it away&amp;quot;&lt;br /&gt;
    End Sub&lt;br /&gt;
End Class&lt;br /&gt;
&amp;lt;Global.Microsoft.VisualBasic.rupilerServices.DesignerGenerated()&amp;gt; _&lt;br /&gt;
Partial Public Class Form1&lt;br /&gt;
    Inherits System.Windows.Forms.Form&lt;br /&gt;
    &amp;quot;Form overrides dispose to clean up the component list.&lt;br /&gt;
    &amp;lt;System.Diagnostics.DebuggerNonUserCode()&amp;gt; _&lt;br /&gt;
    Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean)&lt;br /&gt;
        If disposing AndAlso components IsNot Nothing Then&lt;br /&gt;
            components.Dispose()&lt;br /&gt;
        End If&lt;br /&gt;
        MyBase.Dispose(disposing)&lt;br /&gt;
    End Sub&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; _&lt;br /&gt;
    Private Sub InitializeComponent()&lt;br /&gt;
        Me.lblInstructions = New System.Windows.Forms.Label&lt;br /&gt;
        Me.SuspendLayout()&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        &amp;quot;lblInstructions&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        Me.lblInstructions.AutoSize = True&lt;br /&gt;
        Me.lblInstructions.Location = New System.Drawing.Point(8, 8)&lt;br /&gt;
        Me.lblInstructions.Name = &amp;quot;lblInstructions&amp;quot;&lt;br /&gt;
        Me.lblInstructions.Size = New System.Drawing.Size(67, 13)&lt;br /&gt;
        Me.lblInstructions.TabIndex = 0&lt;br /&gt;
        Me.lblInstructions.Text = &amp;quot;lblInstructions&amp;quot;&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        &amp;quot;Form1&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)&lt;br /&gt;
        Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font&lt;br /&gt;
        Me.ClientSize = New System.Drawing.Size(286, 116)&lt;br /&gt;
        Me.Controls.Add(Me.lblInstructions)&lt;br /&gt;
        Me.Name = &amp;quot;Form1&amp;quot;&lt;br /&gt;
        Me.Text = &amp;quot;MultiLineLabel&amp;quot;&lt;br /&gt;
        Me.ResumeLayout(False)&lt;br /&gt;
        Me.PerformLayout()&lt;br /&gt;
    End Sub&lt;br /&gt;
    Friend WithEvents lblInstructions As System.Windows.Forms.Label&lt;br /&gt;
End Class&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Set Label&amp;quot;s ImageList==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
&amp;lt;source lang=&amp;quot;vbnet&amp;quot;&amp;gt;imports System&lt;br /&gt;
imports System.Drawing&lt;br /&gt;
imports System.Windows.Forms&lt;br /&gt;
public class ImageLists : inherits Form&lt;br /&gt;
  dim imgList as ImageList = new ImageList()&lt;br /&gt;
    dim lbl as Label &lt;br /&gt;
    dim lnk as LinkLabel&lt;br /&gt;
    dim btn as Button&lt;br /&gt;
    dim nmbrUpDown as NumericUpDown&lt;br /&gt;
  public sub New()&lt;br /&gt;
       Size = new Size(300,300)&lt;br /&gt;
    dim img as Image&lt;br /&gt;
    dim i as integer&lt;br /&gt;
    dim arFiles as string() = {&amp;quot;1.ico&amp;quot;,&amp;quot;2.ico&amp;quot;,&amp;quot;3.ico&amp;quot;,&amp;quot;4.ico&amp;quot;}&lt;br /&gt;
    for i = 0 to arFiles.Length - 1&lt;br /&gt;
      img = Image.FromFile(arFiles(i))&lt;br /&gt;
      imgList.Images.Add(img)&lt;br /&gt;
    next&lt;br /&gt;
    imgList.ImageSize = new Size(32, 32)&lt;br /&gt;
    img = Image.FromFile(&amp;quot;5.ico&amp;quot;)&lt;br /&gt;
    imgList.Images(imgList.Images.Count - 1) = img&lt;br /&gt;
       lbl = new Label()&lt;br /&gt;
       lbl.Parent = me&lt;br /&gt;
       lbl.Text = &amp;quot;Label&amp;quot;&lt;br /&gt;
       lbl.Location = new Point(0,0)&lt;br /&gt;
       lbl.Size = new Size (200,20)&lt;br /&gt;
       lbl.BorderStyle = BorderStyle.Fixed3D&lt;br /&gt;
    lbl.ImageList = imgList&lt;br /&gt;
    lbl.ImageIndex = 0&lt;br /&gt;
    lbl.ImageAlign = ContentAlignment.MiddleRight&lt;br /&gt;
    &amp;quot;  Create numeric updown to select the image&lt;br /&gt;
    nmbrUpDown = new NumericUpDown()&lt;br /&gt;
    nmbrUpDown.Parent = me&lt;br /&gt;
    nmbrUpDown.Location = new Point(0, 60)&lt;br /&gt;
    nmbrUpDown.Value = 0&lt;br /&gt;
    nmbrUpDown.Minimum = 0&lt;br /&gt;
    nmbrUpDown.Maximum = imgList.Images.Count - 1&lt;br /&gt;
    nmbrUpDown.Width = 50&lt;br /&gt;
    nmbrUpDown.ReadOnly = true&lt;br /&gt;
    AddHandler nmbrUpDown.ValueChanged,AddressOf nmbrUpDown_ValueChanged&lt;br /&gt;
    end sub&lt;br /&gt;
    public shared sub Main() &lt;br /&gt;
      Application.Run(new ImageLists())&lt;br /&gt;
    end sub&lt;br /&gt;
    private sub nmbrUpDown_ValueChanged(ByVal sender as object,ByVal e as EventArgs)&lt;br /&gt;
      dim n as NumericUpDown  = CType(sender, NumericUpDown)&lt;br /&gt;
    lbl.ImageIndex = CType(n.Value, Integer)&lt;br /&gt;
    end sub&lt;br /&gt;
end class&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Use Color dialog to set the Label foreground color==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
&amp;lt;source lang=&amp;quot;vbnet&amp;quot;&amp;gt;Imports System.Drawing&lt;br /&gt;
Imports System.Drawing.Drawing2D&lt;br /&gt;
Imports System.Windows.Forms&lt;br /&gt;
public class UseColorDialogToSetLabelForeGroundColor&lt;br /&gt;
   public Shared Sub Main&lt;br /&gt;
        Application.Run(New 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;
    Public Sub New()&lt;br /&gt;
        MyBase.New()&lt;br /&gt;
        InitializeComponent()&lt;br /&gt;
    End Sub&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;
    Private components As System.ruponentModel.IContainer&lt;br /&gt;
    Friend WithEvents Button1 As System.Windows.Forms.Button&lt;br /&gt;
    Friend WithEvents ColorDialog1 As System.Windows.Forms.ColorDialog&lt;br /&gt;
    Friend WithEvents Label1 As System.Windows.Forms.Label&lt;br /&gt;
    &amp;lt;System.Diagnostics.DebuggerStepThrough()&amp;gt; Private Sub InitializeComponent()&lt;br /&gt;
        Me.Button1 = New System.Windows.Forms.Button&lt;br /&gt;
        Me.ColorDialog1 = New System.Windows.Forms.ColorDialog&lt;br /&gt;
        Me.Label1 = New System.Windows.Forms.Label&lt;br /&gt;
        Me.SuspendLayout()&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(88, 152)&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;Change Color&amp;quot;&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        &amp;quot;Label1&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        Me.Label1.Font = New System.Drawing.Font(&amp;quot;Microsoft Sans Serif&amp;quot;, 27.75!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))&lt;br /&gt;
        Me.Label1.Location = New System.Drawing.Point(72, 24)&lt;br /&gt;
        Me.Label1.Name = &amp;quot;Label1&amp;quot;&lt;br /&gt;
        Me.Label1.Size = New System.Drawing.Size(120, 104)&lt;br /&gt;
        Me.Label1.TabIndex = 2&lt;br /&gt;
        Me.Label1.Text = &amp;quot;www.vbex.ru&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(256, 214)&lt;br /&gt;
        Me.Controls.Add(Me.Label1)&lt;br /&gt;
        Me.Controls.Add(Me.Button1)&lt;br /&gt;
        Me.Name = &amp;quot;Form1&amp;quot;&lt;br /&gt;
        Me.Text = &amp;quot;Color Setting&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;
        ColorDialog1.ShowDialog()&lt;br /&gt;
        Label1.ForeColor = ColorDialog1.Color&lt;br /&gt;
    End Sub&lt;br /&gt;
End Class&amp;lt;/source&amp;gt;&lt;/div&gt;</summary>
		<author><name>Admin</name></author>	</entry>

	</feed>