<?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%2FGUI_Windows_Form%2FLabel</id>
		<title>Csharp/C Sharp/GUI Windows Form/Label - История изменений</title>
		<link rel="self" type="application/atom+xml" href="http://nfex.ru/index.php?action=history&amp;feed=atom&amp;title=Csharp%2FC_Sharp%2FGUI_Windows_Form%2FLabel"/>
		<link rel="alternate" type="text/html" href="http://nfex.ru/index.php?title=Csharp/C_Sharp/GUI_Windows_Form/Label&amp;action=history"/>
		<updated>2026-04-30T01:05:39Z</updated>
		<subtitle>История изменений этой страницы в вики</subtitle>
		<generator>MediaWiki 1.30.0</generator>

	<entry>
		<id>http://nfex.ru/index.php?title=Csharp/C_Sharp/GUI_Windows_Form/Label&amp;diff=110&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/GUI_Windows_Form/Label&amp;diff=110&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/GUI_Windows_Form/Label&amp;diff=111&amp;oldid=prev</id>
		<title>Admin: 1 версия</title>
		<link rel="alternate" type="text/html" href="http://nfex.ru/index.php?title=Csharp/C_Sharp/GUI_Windows_Form/Label&amp;diff=111&amp;oldid=prev"/>
				<updated>2010-05-26T11:33:11Z</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 and set ImageAlign to MiddleRight==&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;
    private System.Windows.Forms.Label label1;&lt;br /&gt;
  public Form1() {&lt;br /&gt;
        InitializeComponent();&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.SuspendLayout();&lt;br /&gt;
        this.label1.Image = new Bitmap(&amp;quot;winter.jpg&amp;quot;);&lt;br /&gt;
        this.label1.ImageAlign = System.Drawing.ContentAlignment.TopRight;&lt;br /&gt;
        this.label1.Location = new System.Drawing.Point(20, 9);&lt;br /&gt;
        this.label1.Name = &amp;quot;label1&amp;quot;;&lt;br /&gt;
        this.label1.Size = new System.Drawing.Size(105, 77);&lt;br /&gt;
        this.label1.TabIndex = 0;&lt;br /&gt;
        this.label1.Text = &amp;quot;label1&amp;quot;;&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(299, 271);&lt;br /&gt;
        this.Controls.Add(this.label1);&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;ImagesInCommonControls&amp;quot;;&lt;br /&gt;
        this.Text = &amp;quot;ImagesInCommonControls&amp;quot;;&lt;br /&gt;
        this.ResumeLayout(false);&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;
==Label auto resize==&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;
    private System.Windows.Forms.GroupBox groupBox1;&lt;br /&gt;
    private System.Windows.Forms.Label label1;&lt;br /&gt;
    private System.Windows.Forms.TextBox textBox1;&lt;br /&gt;
    private System.Windows.Forms.Button cmdSetText;&lt;br /&gt;
    private System.Windows.Forms.Button cmdSetTextConstraint;&lt;br /&gt;
  public Form1() {&lt;br /&gt;
        InitializeComponent();&lt;br /&gt;
  }&lt;br /&gt;
    private void InitializeComponent(){&lt;br /&gt;
        this.groupBox1 = new System.Windows.Forms.GroupBox();&lt;br /&gt;
        this.label1 = new System.Windows.Forms.Label();&lt;br /&gt;
        this.textBox1 = new System.Windows.Forms.TextBox();&lt;br /&gt;
        this.cmdSetText = new System.Windows.Forms.Button();&lt;br /&gt;
        this.cmdSetTextConstraint = new System.Windows.Forms.Button();&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.AutoSize = true;&lt;br /&gt;
        this.groupBox1.Controls.Add(this.label1);&lt;br /&gt;
        this.groupBox1.Location = new System.Drawing.Point(15, 133);&lt;br /&gt;
        this.groupBox1.Margin = new System.Windows.Forms.Padding(20);&lt;br /&gt;
        this.groupBox1.Name = &amp;quot;groupBox1&amp;quot;;&lt;br /&gt;
        this.groupBox1.Size = new System.Drawing.Size(200, 100);&lt;br /&gt;
        this.groupBox1.TabIndex = 0;&lt;br /&gt;
        this.groupBox1.TabStop = false;&lt;br /&gt;
        this.groupBox1.Text = &amp;quot;groupBox1&amp;quot;;&lt;br /&gt;
        // &lt;br /&gt;
        // label1&lt;br /&gt;
        // &lt;br /&gt;
        this.label1.AutoSize = true;&lt;br /&gt;
        this.label1.Location = new System.Drawing.Point(17, 25);&lt;br /&gt;
        this.label1.Margin = new System.Windows.Forms.Padding(5);&lt;br /&gt;
        this.label1.Name = &amp;quot;label1&amp;quot;;&lt;br /&gt;
        this.label1.Size = new System.Drawing.Size(35, 13);&lt;br /&gt;
        this.label1.TabIndex = 0;&lt;br /&gt;
        this.label1.Text = &amp;quot;label1&amp;quot;;&lt;br /&gt;
        // &lt;br /&gt;
        // textBox1&lt;br /&gt;
        // &lt;br /&gt;
        this.textBox1.Location = new System.Drawing.Point(15, 12);&lt;br /&gt;
        this.textBox1.Multiline = true;&lt;br /&gt;
        this.textBox1.Name = &amp;quot;textBox1&amp;quot;;&lt;br /&gt;
        this.textBox1.ScrollBars = System.Windows.Forms.ScrollBars.Vertical;&lt;br /&gt;
        this.textBox1.Size = new System.Drawing.Size(200, 47);&lt;br /&gt;
        this.textBox1.TabIndex = 1;&lt;br /&gt;
        this.textBox1.Text = &amp;quot;The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the l&amp;quot; +&lt;br /&gt;
            &amp;quot;azy dog.&amp;quot;;&lt;br /&gt;
        // &lt;br /&gt;
        // cmdSetText&lt;br /&gt;
        // &lt;br /&gt;
        this.cmdSetText.Location = new System.Drawing.Point(50, 65);&lt;br /&gt;
        this.cmdSetText.Name = &amp;quot;cmdSetText&amp;quot;;&lt;br /&gt;
        this.cmdSetText.Size = new System.Drawing.Size(165, 23);&lt;br /&gt;
        this.cmdSetText.TabIndex = 2;&lt;br /&gt;
        this.cmdSetText.Text = &amp;quot;Set Text&amp;quot;;&lt;br /&gt;
        this.cmdSetText.UseVisualStyleBackColor = true;&lt;br /&gt;
        this.cmdSetText.Click += new System.EventHandler(this.cmdSetText_Click);&lt;br /&gt;
        // &lt;br /&gt;
        // cmdSetTextConstraint&lt;br /&gt;
        // &lt;br /&gt;
        this.cmdSetTextConstraint.Location = new System.Drawing.Point(50, 91);&lt;br /&gt;
        this.cmdSetTextConstraint.Name = &amp;quot;cmdSetTextConstraint&amp;quot;;&lt;br /&gt;
        this.cmdSetTextConstraint.Size = new System.Drawing.Size(165, 23);&lt;br /&gt;
        this.cmdSetTextConstraint.TabIndex = 3;&lt;br /&gt;
        this.cmdSetTextConstraint.Text = &amp;quot;Constrain Label and Set Text&amp;quot;;&lt;br /&gt;
        this.cmdSetTextConstraint.UseVisualStyleBackColor = true;&lt;br /&gt;
        this.cmdSetTextConstraint.Click += new System.EventHandler(this.cmdSetTextConstraint_Click);&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.AutoSize = true;&lt;br /&gt;
        this.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;&lt;br /&gt;
        this.ClientSize = new System.Drawing.Size(247, 336);&lt;br /&gt;
        this.Controls.Add(this.cmdSetTextConstraint);&lt;br /&gt;
        this.Controls.Add(this.cmdSetText);&lt;br /&gt;
        this.Controls.Add(this.textBox1);&lt;br /&gt;
        this.Controls.Add(this.groupBox1);&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;Form1&amp;quot;;&lt;br /&gt;
        this.groupBox1.ResumeLayout(false);&lt;br /&gt;
        this.groupBox1.PerformLayout();&lt;br /&gt;
        this.ResumeLayout(false);&lt;br /&gt;
        this.PerformLayout();&lt;br /&gt;
    }&lt;br /&gt;
    private void cmdSetText_Click(object sender, EventArgs e)&lt;br /&gt;
    {&lt;br /&gt;
        label1.MaximumSize = new Size(0,0);&lt;br /&gt;
        label1.Text = &amp;quot;&amp;quot;;&lt;br /&gt;
        label1.Text = textBox1.Text;&lt;br /&gt;
    }&lt;br /&gt;
    private void cmdSetTextConstraint_Click(object sender, EventArgs e)&lt;br /&gt;
    {&lt;br /&gt;
        label1.MaximumSize = new Size(200,0);&lt;br /&gt;
        label1.Text = textBox1.Text;&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;
==Label grows as the inner text==&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;
    private System.Windows.Forms.GroupBox groupBox1;&lt;br /&gt;
    private System.Windows.Forms.Label label1;&lt;br /&gt;
    private System.Windows.Forms.TextBox textBox1;&lt;br /&gt;
    private System.Windows.Forms.Button cmdSetText;&lt;br /&gt;
    private System.Windows.Forms.Button cmdSetTextConstraint;&lt;br /&gt;
  public Form1() {&lt;br /&gt;
        InitializeComponent();&lt;br /&gt;
  }&lt;br /&gt;
    private void InitializeComponent(){&lt;br /&gt;
        this.groupBox1 = new System.Windows.Forms.GroupBox();&lt;br /&gt;
        this.label1 = new System.Windows.Forms.Label();&lt;br /&gt;
        this.textBox1 = new System.Windows.Forms.TextBox();&lt;br /&gt;
        this.cmdSetText = new System.Windows.Forms.Button();&lt;br /&gt;
        this.cmdSetTextConstraint = new System.Windows.Forms.Button();&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.AutoSize = true;&lt;br /&gt;
        this.groupBox1.Controls.Add(this.label1);&lt;br /&gt;
        this.groupBox1.Location = new System.Drawing.Point(15, 133);&lt;br /&gt;
        this.groupBox1.Margin = new System.Windows.Forms.Padding(20);&lt;br /&gt;
        this.groupBox1.Name = &amp;quot;groupBox1&amp;quot;;&lt;br /&gt;
        this.groupBox1.Size = new System.Drawing.Size(200, 100);&lt;br /&gt;
        this.groupBox1.TabIndex = 0;&lt;br /&gt;
        this.groupBox1.TabStop = false;&lt;br /&gt;
        this.groupBox1.Text = &amp;quot;groupBox1&amp;quot;;&lt;br /&gt;
        // &lt;br /&gt;
        // label1&lt;br /&gt;
        // &lt;br /&gt;
        this.label1.AutoSize = true;&lt;br /&gt;
        this.label1.Location = new System.Drawing.Point(17, 25);&lt;br /&gt;
        this.label1.Margin = new System.Windows.Forms.Padding(5);&lt;br /&gt;
        this.label1.Name = &amp;quot;label1&amp;quot;;&lt;br /&gt;
        this.label1.Size = new System.Drawing.Size(35, 13);&lt;br /&gt;
        this.label1.TabIndex = 0;&lt;br /&gt;
        this.label1.Text = &amp;quot;label1&amp;quot;;&lt;br /&gt;
        // &lt;br /&gt;
        // textBox1&lt;br /&gt;
        // &lt;br /&gt;
        this.textBox1.Location = new System.Drawing.Point(15, 12);&lt;br /&gt;
        this.textBox1.Multiline = true;&lt;br /&gt;
        this.textBox1.Name = &amp;quot;textBox1&amp;quot;;&lt;br /&gt;
        this.textBox1.ScrollBars = System.Windows.Forms.ScrollBars.Vertical;&lt;br /&gt;
        this.textBox1.Size = new System.Drawing.Size(200, 47);&lt;br /&gt;
        this.textBox1.TabIndex = 1;&lt;br /&gt;
        this.textBox1.Text = &amp;quot;The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the l&amp;quot; +&lt;br /&gt;
            &amp;quot;azy dog.&amp;quot;;&lt;br /&gt;
        // &lt;br /&gt;
        // cmdSetText&lt;br /&gt;
        // &lt;br /&gt;
        this.cmdSetText.Location = new System.Drawing.Point(50, 65);&lt;br /&gt;
        this.cmdSetText.Name = &amp;quot;cmdSetText&amp;quot;;&lt;br /&gt;
        this.cmdSetText.Size = new System.Drawing.Size(165, 23);&lt;br /&gt;
        this.cmdSetText.TabIndex = 2;&lt;br /&gt;
        this.cmdSetText.Text = &amp;quot;Set Text&amp;quot;;&lt;br /&gt;
        this.cmdSetText.UseVisualStyleBackColor = true;&lt;br /&gt;
        this.cmdSetText.Click += new System.EventHandler(this.cmdSetText_Click);&lt;br /&gt;
        // &lt;br /&gt;
        // cmdSetTextConstraint&lt;br /&gt;
        // &lt;br /&gt;
        this.cmdSetTextConstraint.Location = new System.Drawing.Point(50, 91);&lt;br /&gt;
        this.cmdSetTextConstraint.Name = &amp;quot;cmdSetTextConstraint&amp;quot;;&lt;br /&gt;
        this.cmdSetTextConstraint.Size = new System.Drawing.Size(165, 23);&lt;br /&gt;
        this.cmdSetTextConstraint.TabIndex = 3;&lt;br /&gt;
        this.cmdSetTextConstraint.Text = &amp;quot;Constrain Label and Set Text&amp;quot;;&lt;br /&gt;
        this.cmdSetTextConstraint.UseVisualStyleBackColor = true;&lt;br /&gt;
        this.cmdSetTextConstraint.Click += new System.EventHandler(this.cmdSetTextConstraint_Click);&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.AutoSize = true;&lt;br /&gt;
        this.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;&lt;br /&gt;
        this.ClientSize = new System.Drawing.Size(247, 336);&lt;br /&gt;
        this.Controls.Add(this.cmdSetTextConstraint);&lt;br /&gt;
        this.Controls.Add(this.cmdSetText);&lt;br /&gt;
        this.Controls.Add(this.textBox1);&lt;br /&gt;
        this.Controls.Add(this.groupBox1);&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;Form1&amp;quot;;&lt;br /&gt;
        this.groupBox1.ResumeLayout(false);&lt;br /&gt;
        this.groupBox1.PerformLayout();&lt;br /&gt;
        this.ResumeLayout(false);&lt;br /&gt;
        this.PerformLayout();&lt;br /&gt;
    }&lt;br /&gt;
    private void cmdSetText_Click(object sender, EventArgs e)&lt;br /&gt;
    {&lt;br /&gt;
        label1.MaximumSize = new Size(0,0);&lt;br /&gt;
        label1.Text = &amp;quot;&amp;quot;;&lt;br /&gt;
        label1.Text = textBox1.Text;&lt;br /&gt;
    }&lt;br /&gt;
    private void cmdSetTextConstraint_Click(object sender, EventArgs e)&lt;br /&gt;
    {&lt;br /&gt;
        label1.MaximumSize = new Size(200,0);&lt;br /&gt;
        label1.Text = textBox1.Text;&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;
==Label: Localtion, Name, Size, TabIndex, Text==&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.Windows.Forms;&lt;br /&gt;
class MainForm : Form&lt;br /&gt;
{&lt;br /&gt;
    private Label label1;&lt;br /&gt;
    private TextBox textBox1;&lt;br /&gt;
    private Button button1;&lt;br /&gt;
    public MainForm()&lt;br /&gt;
    {&lt;br /&gt;
         this.label1 = new Label();&lt;br /&gt;
         this.textBox1 = new TextBox();&lt;br /&gt;
         this.button1 = new Button();&lt;br /&gt;
         this.SuspendLayout();&lt;br /&gt;
         this.label1.Location = new System.Drawing.Point(16, 36);&lt;br /&gt;
         this.label1.Name = &amp;quot;label1&amp;quot;;&lt;br /&gt;
         this.label1.Size = new System.Drawing.Size(128, 16);&lt;br /&gt;
         this.label1.TabIndex = 0;&lt;br /&gt;
         this.label1.Text = &amp;quot;Please enter your name:&amp;quot;; &lt;br /&gt;
         this.textBox1.Location = new System.Drawing.Point(152, 32);&lt;br /&gt;
         this.textBox1.Name = &amp;quot;textBox1&amp;quot;;&lt;br /&gt;
         this.textBox1.TabIndex = 1;&lt;br /&gt;
         this.textBox1.Text = &amp;quot;&amp;quot;;&lt;br /&gt;
         this.button1.Location = new System.Drawing.Point(109, 80);&lt;br /&gt;
         this.button1.Name = &amp;quot;button1&amp;quot;;&lt;br /&gt;
         this.button1.TabIndex = 2;&lt;br /&gt;
         this.button1.Text = &amp;quot;Enter&amp;quot;;&lt;br /&gt;
         this.button1.Click += new System.EventHandler(this.button1_Click);&lt;br /&gt;
         this.ClientSize = new System.Drawing.Size(292, 126);&lt;br /&gt;
         this.Controls.Add(this.button1);&lt;br /&gt;
         this.Controls.Add(this.textBox1);&lt;br /&gt;
         this.Controls.Add(this.label1);&lt;br /&gt;
         this.Name = &amp;quot;form1&amp;quot;;&lt;br /&gt;
         this.Text = &amp;quot;Visual C#&amp;quot;;&lt;br /&gt;
         this.ResumeLayout(false);&lt;br /&gt;
     }&lt;br /&gt;
     private void button1_Click(object sender, System.EventArgs e)&lt;br /&gt;
     {&lt;br /&gt;
        System.Console.WriteLine(&amp;quot;User entered: &amp;quot; + textBox1.Text);&lt;br /&gt;
        MessageBox.Show(&amp;quot;Welcome, &amp;quot; + textBox1.Text, &amp;quot;Visual C#&amp;quot;);&lt;br /&gt;
     }&lt;br /&gt;
     [STAThread]&lt;br /&gt;
     public static void Main()&lt;br /&gt;
     {&lt;br /&gt;
        Application.EnableVisualStyles();&lt;br /&gt;
        Application.Run(new MainForm());&lt;br /&gt;
     }&lt;br /&gt;
}&lt;br /&gt;
 &amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Marquee Label Host==&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.Drawing;&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 MarqueeLabelHost&lt;br /&gt;
{&lt;br /&gt;
    /// &amp;lt;summary&amp;gt;&lt;br /&gt;
    /// Summary description for MarqueeLabelHost.&lt;br /&gt;
    /// &amp;lt;/summary&amp;gt;&lt;br /&gt;
    public class MarqueeLabelHost : System.Windows.Forms.Form&lt;br /&gt;
    {&lt;br /&gt;
        internal System.Windows.Forms.GroupBox GroupBox1;&lt;br /&gt;
        internal System.Windows.Forms.Label Label2;&lt;br /&gt;
        internal System.Windows.Forms.TrackBar tbInterval;&lt;br /&gt;
        internal System.Windows.Forms.Label Label1;&lt;br /&gt;
        internal System.Windows.Forms.TrackBar tbAmount;&lt;br /&gt;
        private MarqueeLabel marqueeLabel1;&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 MarqueeLabelHost()&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.Label2 = new System.Windows.Forms.Label();&lt;br /&gt;
            this.tbInterval = new System.Windows.Forms.TrackBar();&lt;br /&gt;
            this.Label1 = new System.Windows.Forms.Label();&lt;br /&gt;
            this.tbAmount = new System.Windows.Forms.TrackBar();&lt;br /&gt;
            this.marqueeLabel1 = new MarqueeLabel();&lt;br /&gt;
            this.GroupBox1.SuspendLayout();&lt;br /&gt;
            ((System.ruponentModel.ISupportInitialize)(this.tbInterval)).BeginInit();&lt;br /&gt;
            ((System.ruponentModel.ISupportInitialize)(this.tbAmount)).BeginInit();&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.Bottom) &lt;br /&gt;
                | 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.Label2,&lt;br /&gt;
                                                                                    this.tbInterval,&lt;br /&gt;
                                                                                    this.Label1,&lt;br /&gt;
                                                                                    this.tbAmount});&lt;br /&gt;
            this.GroupBox1.FlatStyle = System.Windows.Forms.FlatStyle.System;&lt;br /&gt;
            this.GroupBox1.Location = new System.Drawing.Point(24, 176);&lt;br /&gt;
            this.GroupBox1.Name = &amp;quot;GroupBox1&amp;quot;;&lt;br /&gt;
            this.GroupBox1.Size = new System.Drawing.Size(336, 132);&lt;br /&gt;
            this.GroupBox1.TabIndex = 4;&lt;br /&gt;
            this.GroupBox1.TabStop = false;&lt;br /&gt;
            // &lt;br /&gt;
            // Label2&lt;br /&gt;
            // &lt;br /&gt;
            this.Label2.Location = new System.Drawing.Point(12, 76);&lt;br /&gt;
            this.Label2.Name = &amp;quot;Label2&amp;quot;;&lt;br /&gt;
            this.Label2.Size = new System.Drawing.Size(80, 23);&lt;br /&gt;
            this.Label2.TabIndex = 6;&lt;br /&gt;
            this.Label2.Text = &amp;quot;Scroll Interval:&amp;quot;;&lt;br /&gt;
            // &lt;br /&gt;
            // tbInterval&lt;br /&gt;
            // &lt;br /&gt;
            this.tbInterval.Location = new System.Drawing.Point(96, 72);&lt;br /&gt;
            this.tbInterval.Maximum = 500;&lt;br /&gt;
            this.tbInterval.Minimum = 10;&lt;br /&gt;
            this.tbInterval.Name = &amp;quot;tbInterval&amp;quot;;&lt;br /&gt;
            this.tbInterval.Size = new System.Drawing.Size(228, 45);&lt;br /&gt;
            this.tbInterval.TabIndex = 5;&lt;br /&gt;
            this.tbInterval.TickFrequency = 10;&lt;br /&gt;
            this.tbInterval.Value = 100;&lt;br /&gt;
            this.tbInterval.Scroll += new System.EventHandler(this.tbInterval_Scroll);&lt;br /&gt;
            // &lt;br /&gt;
            // Label1&lt;br /&gt;
            // &lt;br /&gt;
            this.Label1.Location = new System.Drawing.Point(12, 20);&lt;br /&gt;
            this.Label1.Name = &amp;quot;Label1&amp;quot;;&lt;br /&gt;
            this.Label1.Size = new System.Drawing.Size(80, 23);&lt;br /&gt;
            this.Label1.TabIndex = 4;&lt;br /&gt;
            this.Label1.Text = &amp;quot;Scroll Amount:&amp;quot;;&lt;br /&gt;
            // &lt;br /&gt;
            // tbAmount&lt;br /&gt;
            // &lt;br /&gt;
            this.tbAmount.Location = new System.Drawing.Point(96, 16);&lt;br /&gt;
            this.tbAmount.Maximum = 20;&lt;br /&gt;
            this.tbAmount.Name = &amp;quot;tbAmount&amp;quot;;&lt;br /&gt;
            this.tbAmount.Size = new System.Drawing.Size(228, 45);&lt;br /&gt;
            this.tbAmount.TabIndex = 3;&lt;br /&gt;
            this.tbAmount.Value = 1;&lt;br /&gt;
            this.tbAmount.Scroll += new System.EventHandler(this.tbAmount_Scroll);&lt;br /&gt;
            // &lt;br /&gt;
            // marqueeLabel1&lt;br /&gt;
            // &lt;br /&gt;
            this.marqueeLabel1.Anchor = ((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) &lt;br /&gt;
                | System.Windows.Forms.AnchorStyles.Right);&lt;br /&gt;
            this.marqueeLabel1.Font = new System.Drawing.Font(&amp;quot;Verdana&amp;quot;, 26.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));&lt;br /&gt;
            this.marqueeLabel1.ForeColor = System.Drawing.Color.Navy;&lt;br /&gt;
            this.marqueeLabel1.Location = new System.Drawing.Point(0, 12);&lt;br /&gt;
            this.marqueeLabel1.Name = &amp;quot;marqueeLabel1&amp;quot;;&lt;br /&gt;
            this.marqueeLabel1.ScrollTimeInterval = 100;&lt;br /&gt;
            this.marqueeLabel1.Size = new System.Drawing.Size(384, 156);&lt;br /&gt;
            this.marqueeLabel1.TabIndex = 5;&lt;br /&gt;
            this.marqueeLabel1.Tag = &amp;quot;&amp;quot;;&lt;br /&gt;
            this.marqueeLabel1.Text = &amp;quot;This scrolls!&amp;quot;;&lt;br /&gt;
            // &lt;br /&gt;
            // MarqueeLabelHost&lt;br /&gt;
            // &lt;br /&gt;
            this.AutoScaleBaseSize = new System.Drawing.Size(5, 14);&lt;br /&gt;
            this.ClientSize = new System.Drawing.Size(380, 318);&lt;br /&gt;
            this.Controls.AddRange(new System.Windows.Forms.Control[] {&lt;br /&gt;
                                                                          this.marqueeLabel1,&lt;br /&gt;
                                                                          this.GroupBox1});&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;MarqueeLabelHost&amp;quot;;&lt;br /&gt;
            this.Text = &amp;quot;MarqueeLabelHost&amp;quot;;&lt;br /&gt;
            this.GroupBox1.ResumeLayout(false);&lt;br /&gt;
            ((System.ruponentModel.ISupportInitialize)(this.tbInterval)).EndInit();&lt;br /&gt;
            ((System.ruponentModel.ISupportInitialize)(this.tbAmount)).EndInit();&lt;br /&gt;
            this.ResumeLayout(false);&lt;br /&gt;
        }&lt;br /&gt;
        #endregion&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 MarqueeLabelHost());&lt;br /&gt;
        }&lt;br /&gt;
        private void tbInterval_Scroll(object sender, System.EventArgs e)&lt;br /&gt;
        {&lt;br /&gt;
            marqueeLabel1.ScrollTimeInterval = tbInterval.Value;&lt;br /&gt;
        }&lt;br /&gt;
        private void tbAmount_Scroll(object sender, System.EventArgs e)&lt;br /&gt;
        {&lt;br /&gt;
            marqueeLabel1.ScrollPixelAmount = tbAmount.Value;&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
    /// &amp;lt;summary&amp;gt;&lt;br /&gt;
    /// Summary description for MarqueeLabel.&lt;br /&gt;
    /// &amp;lt;/summary&amp;gt;&lt;br /&gt;
    public class MarqueeLabel : System.Windows.Forms.UserControl&lt;br /&gt;
    {&lt;br /&gt;
        private System.ruponentModel.IContainer components;&lt;br /&gt;
        public MarqueeLabel()&lt;br /&gt;
        {&lt;br /&gt;
            // This call is required by the Windows.Forms Form Designer.&lt;br /&gt;
            InitializeComponent();&lt;br /&gt;
            // TODO: Add any initialization after the InitForm call&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 Component 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.ruponents = new System.ruponentModel.Container();&lt;br /&gt;
            this.tmrScroll = new System.Windows.Forms.Timer(this.ruponents);&lt;br /&gt;
            // &lt;br /&gt;
            // tmrScroll&lt;br /&gt;
            // &lt;br /&gt;
            this.tmrScroll.Tick += new System.EventHandler(this.tmrScroll_Tick);&lt;br /&gt;
            // &lt;br /&gt;
            // MarqueeLabel&lt;br /&gt;
            // &lt;br /&gt;
            this.Name = &amp;quot;MarqueeLabel&amp;quot;;&lt;br /&gt;
            this.Size = new System.Drawing.Size(360, 104);&lt;br /&gt;
            this.Load += new System.EventHandler(this.MarqueeLabel_Load);&lt;br /&gt;
        }&lt;br /&gt;
        #endregion&lt;br /&gt;
        private string text;&lt;br /&gt;
        private int scrollAmount = 10;&lt;br /&gt;
        internal System.Windows.Forms.Timer tmrScroll;&lt;br /&gt;
        private int position = 0;&lt;br /&gt;
        private void MarqueeLabel_Load(object sender, System.EventArgs e)&lt;br /&gt;
        {&lt;br /&gt;
            this.ResizeRedraw = true;&lt;br /&gt;
            if (!this.DesignMode)&lt;br /&gt;
            {&lt;br /&gt;
                tmrScroll.Enabled = true;&lt;br /&gt;
            }&lt;br /&gt;
        }&lt;br /&gt;
        private void tmrScroll_Tick(object sender, System.EventArgs e)&lt;br /&gt;
        {&lt;br /&gt;
            position += scrollAmount;&lt;br /&gt;
            // Force a refresh.&lt;br /&gt;
            this.Invalidate();&lt;br /&gt;
        }&lt;br /&gt;
        [Browsable(true), &lt;br /&gt;
        DesignerSerializationVisibility(DesignerSerializationVisibility.Visible)]&lt;br /&gt;
        public override string Text&lt;br /&gt;
        {&lt;br /&gt;
            get&lt;br /&gt;
            {&lt;br /&gt;
                return text;&lt;br /&gt;
                }&lt;br /&gt;
            set&lt;br /&gt;
            {&lt;br /&gt;
                text = value;&lt;br /&gt;
                this.Invalidate();&lt;br /&gt;
            }&lt;br /&gt;
        }&lt;br /&gt;
        public int ScrollTimeInterval&lt;br /&gt;
        {&lt;br /&gt;
            get&lt;br /&gt;
            {&lt;br /&gt;
                return tmrScroll.Interval;&lt;br /&gt;
            }&lt;br /&gt;
            set&lt;br /&gt;
            {&lt;br /&gt;
                tmrScroll.Interval = value;&lt;br /&gt;
            }&lt;br /&gt;
        }&lt;br /&gt;
        [DefaultValue(10)] &lt;br /&gt;
        public int ScrollPixelAmount&lt;br /&gt;
        {&lt;br /&gt;
            get&lt;br /&gt;
            {&lt;br /&gt;
                return scrollAmount;&lt;br /&gt;
            }&lt;br /&gt;
            set&lt;br /&gt;
            {&lt;br /&gt;
                scrollAmount = value;&lt;br /&gt;
            }&lt;br /&gt;
        }&lt;br /&gt;
        protected override void OnPaintBackground(System.Windows.Forms.PaintEventArgs e)&lt;br /&gt;
        {&lt;br /&gt;
            // Do nothing.&lt;br /&gt;
            // To prevent flicker, we will draw both the background and the text&lt;br /&gt;
            // to a buffered image, and draw it to the control all at once.&lt;br /&gt;
        }&lt;br /&gt;
        protected override void OnPaint(System.Windows.Forms.PaintEventArgs e)&lt;br /&gt;
        {&lt;br /&gt;
            // The following line avoids a design-time error that would&lt;br /&gt;
            // otherwise occur when the control is first loaded (but does not yet&lt;br /&gt;
            // have a defined size).&lt;br /&gt;
            if (e.ClipRectangle.Width == 0)&lt;br /&gt;
            {&lt;br /&gt;
                return;&lt;br /&gt;
            }&lt;br /&gt;
            base.OnPaint(e);&lt;br /&gt;
            if (position &amp;gt; this.Width)&lt;br /&gt;
            {&lt;br /&gt;
                // Reset the text to scroll back onto the control.&lt;br /&gt;
                position = -(int)e.Graphics.MeasureString(text, this.Font).Width;&lt;br /&gt;
            }&lt;br /&gt;
            // Create the drawing area in memory.&lt;br /&gt;
            // Double buffering is used to prevent flicker.&lt;br /&gt;
            Bitmap blt = new Bitmap(e.ClipRectangle.Width, e.ClipRectangle.Height);&lt;br /&gt;
            Graphics g = Graphics.FromImage(blt);&lt;br /&gt;
            g.FillRectangle(new SolidBrush(this.BackColor), e.ClipRectangle);&lt;br /&gt;
            g.DrawString(text, this.Font, new SolidBrush(this.ForeColor), position, 0);&lt;br /&gt;
            // Render the finished image on the form.&lt;br /&gt;
            e.Graphics.DrawImageUnscaled(blt, 0, 0);&lt;br /&gt;
            g.Dispose();&lt;br /&gt;
        }&lt;br /&gt;
&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;
==Set Label Background, foreground color and border style==&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;
      private System.Windows.Forms.Button learnMoreButton;&lt;br /&gt;
      private System.Windows.Forms.Label label2;&lt;br /&gt;
      private System.Windows.Forms.Label label1;&lt;br /&gt;
      &lt;br /&gt;
      public Form1() {&lt;br /&gt;
        InitializeComponent();&lt;br /&gt;
      }&lt;br /&gt;
      private void InitializeComponent()&lt;br /&gt;
      {&lt;br /&gt;
         this.learnMoreButton = new System.Windows.Forms.Button();&lt;br /&gt;
         this.label2 = new System.Windows.Forms.Label();&lt;br /&gt;
         this.label1 = new System.Windows.Forms.Label();&lt;br /&gt;
         this.SuspendLayout();&lt;br /&gt;
         // &lt;br /&gt;
         // learnMoreButton&lt;br /&gt;
         // &lt;br /&gt;
         this.learnMoreButton.Font = new System.Drawing.Font( &amp;quot;Microsoft Sans Serif&amp;quot;, 14F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ( ( byte ) ( 0 ) ) );&lt;br /&gt;
         this.learnMoreButton.Location = new System.Drawing.Point( 17, 81 );&lt;br /&gt;
         this.learnMoreButton.Name = &amp;quot;learnMoreButton&amp;quot;;&lt;br /&gt;
         this.learnMoreButton.Size = new System.Drawing.Size( 120, 59 );&lt;br /&gt;
         this.learnMoreButton.TabIndex = 11;&lt;br /&gt;
         this.learnMoreButton.Text = &amp;quot;Learn More&amp;quot;;&lt;br /&gt;
         // &lt;br /&gt;
         // label2&lt;br /&gt;
         // &lt;br /&gt;
         this.label2.BackColor = System.Drawing.Color.LightYellow;&lt;br /&gt;
         this.label2.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;&lt;br /&gt;
         this.label2.Font = new System.Drawing.Font( &amp;quot;Microsoft Sans Serif&amp;quot;, 11.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ( ( byte ) ( 0 ) ) );&lt;br /&gt;
         this.label2.ForeColor = System.Drawing.Color.MidnightBlue;&lt;br /&gt;
         this.label2.Location = new System.Drawing.Point( 17, 154 );&lt;br /&gt;
         this.label2.Name = &amp;quot;label2&amp;quot;;&lt;br /&gt;
         this.label2.Size = new System.Drawing.Size( 273, 25 );&lt;br /&gt;
         this.label2.TabIndex = 10;&lt;br /&gt;
         this.label2.Text = &amp;quot;text&amp;quot;;&lt;br /&gt;
         this.label2.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;&lt;br /&gt;
         // &lt;br /&gt;
         // label1&lt;br /&gt;
         // &lt;br /&gt;
         this.label1.BackColor = System.Drawing.Color.LightYellow;&lt;br /&gt;
         this.label1.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;&lt;br /&gt;
         this.label1.Font = new System.Drawing.Font( &amp;quot;Microsoft Sans Serif&amp;quot;, 20.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ( ( byte ) ( 0 ) ) );&lt;br /&gt;
         this.label1.ForeColor = System.Drawing.Color.MidnightBlue;&lt;br /&gt;
         this.label1.Location = new System.Drawing.Point( 17, 17 );&lt;br /&gt;
         this.label1.Name = &amp;quot;label1&amp;quot;;&lt;br /&gt;
         this.label1.Size = new System.Drawing.Size( 273, 47 );&lt;br /&gt;
         this.label1.TabIndex = 9;&lt;br /&gt;
         this.label1.Text = &amp;quot;test&amp;quot;;&lt;br /&gt;
         this.label1.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;&lt;br /&gt;
         // &lt;br /&gt;
         // VisualInheritanceForm&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( 307, 201 );&lt;br /&gt;
         this.Controls.Add( this.learnMoreButton );&lt;br /&gt;
         this.Controls.Add( this.label2 );&lt;br /&gt;
         this.Controls.Add( this.label1 );&lt;br /&gt;
         this.Name = &amp;quot;VisualInheritanceForm&amp;quot;;&lt;br /&gt;
         this.Text = &amp;quot;Visual Inheritance&amp;quot;;&lt;br /&gt;
         this.ResumeLayout( false );&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;
==Use Label and Timer to create a Clock==&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.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;
public class Form1 : System.Windows.Forms.Form {&lt;br /&gt;
    public System.Timers.Timer timer1;&lt;br /&gt;
    private System.Windows.Forms.Label label1;&lt;br /&gt;
    public Form1() {&lt;br /&gt;
        this.timer1 = new System.Timers.Timer();&lt;br /&gt;
        this.label1 = new System.Windows.Forms.Label();&lt;br /&gt;
        ((System.ruponentModel.ISupportInitialize)(this.timer1)).BeginInit();&lt;br /&gt;
        this.SuspendLayout();&lt;br /&gt;
        // &lt;br /&gt;
        // timer1&lt;br /&gt;
        // &lt;br /&gt;
        this.timer1.Enabled = true;&lt;br /&gt;
        this.timer1.SynchronizingObject = this;&lt;br /&gt;
        this.timer1.Elapsed += new System.Timers.ElapsedEventHandler(this.OnTimerElapsed);&lt;br /&gt;
        // &lt;br /&gt;
        // label1&lt;br /&gt;
        // &lt;br /&gt;
        this.label1.Font = new System.Drawing.Font(&amp;quot;Microsoft Sans Serif&amp;quot;, 14.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));&lt;br /&gt;
        this.label1.ForeColor = System.Drawing.SystemColors.Highlight;&lt;br /&gt;
        this.label1.Location = new System.Drawing.Point(24, 8);&lt;br /&gt;
        this.label1.Name = &amp;quot;label1&amp;quot;;&lt;br /&gt;
        this.label1.Size = new System.Drawing.Size(224, 48);&lt;br /&gt;
        this.label1.TabIndex = 0;&lt;br /&gt;
        this.label1.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;&lt;br /&gt;
        // &lt;br /&gt;
        // Form1&lt;br /&gt;
        // &lt;br /&gt;
        this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);&lt;br /&gt;
        this.ClientSize = new System.Drawing.Size(292, 69);&lt;br /&gt;
        this.Controls.AddRange(new System.Windows.Forms.Control[] {&lt;br /&gt;
                                                                      this.label1});&lt;br /&gt;
        this.Text = &amp;quot;My Clock&amp;quot;;&lt;br /&gt;
        this.Load += new System.EventHandler(this.Form1_Load);&lt;br /&gt;
        ((System.ruponentModel.ISupportInitialize)(this.timer1)).EndInit();&lt;br /&gt;
        this.ResumeLayout(false);&lt;br /&gt;
    }&lt;br /&gt;
    [STAThread]&lt;br /&gt;
    static void Main() {&lt;br /&gt;
        Application.Run(new Form1());&lt;br /&gt;
    }&lt;br /&gt;
    private void Form1_Load(object sender, System.EventArgs e) {&lt;br /&gt;
        timer1.Interval = 1000;&lt;br /&gt;
        timer1.Start();&lt;br /&gt;
        timer1.Enabled = true;&lt;br /&gt;
    }&lt;br /&gt;
    private void OnTimerElapsed(object sender, System.Timers.ElapsedEventArgs e) {&lt;br /&gt;
        label1.Text = DateTime.Now.ToString();&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>