<?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%2FCSharp_Tutorial%2FGUI_Windows_Forms%2FNumericUpDown</id>
		<title>Csharp/CSharp Tutorial/GUI Windows Forms/NumericUpDown - История изменений</title>
		<link rel="self" type="application/atom+xml" href="http://nfex.ru/index.php?action=history&amp;feed=atom&amp;title=Csharp%2FCSharp_Tutorial%2FGUI_Windows_Forms%2FNumericUpDown"/>
		<link rel="alternate" type="text/html" href="http://nfex.ru/index.php?title=Csharp/CSharp_Tutorial/GUI_Windows_Forms/NumericUpDown&amp;action=history"/>
		<updated>2026-04-29T21:47:58Z</updated>
		<subtitle>История изменений этой страницы в вики</subtitle>
		<generator>MediaWiki 1.30.0</generator>

	<entry>
		<id>http://nfex.ru/index.php?title=Csharp/CSharp_Tutorial/GUI_Windows_Forms/NumericUpDown&amp;diff=5445&amp;oldid=prev</id>
		<title> в 15:31, 26 мая 2010</title>
		<link rel="alternate" type="text/html" href="http://nfex.ru/index.php?title=Csharp/CSharp_Tutorial/GUI_Windows_Forms/NumericUpDown&amp;diff=5445&amp;oldid=prev"/>
				<updated>2010-05-26T15:31:53Z</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/CSharp_Tutorial/GUI_Windows_Forms/NumericUpDown&amp;diff=5446&amp;oldid=prev</id>
		<title>Admin: 1 версия</title>
		<link rel="alternate" type="text/html" href="http://nfex.ru/index.php?title=Csharp/CSharp_Tutorial/GUI_Windows_Forms/NumericUpDown&amp;diff=5446&amp;oldid=prev"/>
				<updated>2010-05-26T12:15:31Z</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;==Get value from NumericUpDown==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
&amp;lt;source lang=&amp;quot;csharp&amp;quot;&amp;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 UpDownForm : System.Windows.Forms.Form&lt;br /&gt;
{&lt;br /&gt;
  private System.ruponentModel.Container components = null;&lt;br /&gt;
  private System.Windows.Forms.Label lblCurrSel;&lt;br /&gt;
  private System.Windows.Forms.Button btnGetSelections;&lt;br /&gt;
  private System.Windows.Forms.Label label2;&lt;br /&gt;
  private System.Windows.Forms.Label label1;&lt;br /&gt;
  private System.Windows.Forms.NumericUpDown numericUpDown;&lt;br /&gt;
  private System.Windows.Forms.DomainUpDown domainUpDown;&lt;br /&gt;
  public UpDownForm()&lt;br /&gt;
  {&lt;br /&gt;
    InitializeComponent();&lt;br /&gt;
    domainUpDown.SelectedIndex = 2;&lt;br /&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;
  private void InitializeComponent()&lt;br /&gt;
  {&lt;br /&gt;
    this.label1 = new System.Windows.Forms.Label();&lt;br /&gt;
    this.label2 = new System.Windows.Forms.Label();&lt;br /&gt;
    this.numericUpDown = new System.Windows.Forms.NumericUpDown();&lt;br /&gt;
    this.domainUpDown = new System.Windows.Forms.DomainUpDown();&lt;br /&gt;
    this.btnGetSelections = new System.Windows.Forms.Button();&lt;br /&gt;
    this.lblCurrSel = new System.Windows.Forms.Label();&lt;br /&gt;
    ((System.ruponentModel.ISupportInitialize)(this.numericUpDown)).BeginInit();&lt;br /&gt;
    this.SuspendLayout();&lt;br /&gt;
    // &lt;br /&gt;
    // label1&lt;br /&gt;
    // &lt;br /&gt;
    this.label1.Font = new System.Drawing.Font(&amp;quot;Verdana&amp;quot;, 12F);&lt;br /&gt;
    this.label1.Location = new System.Drawing.Point(8, 24);&lt;br /&gt;
    this.label1.Name = &amp;quot;label1&amp;quot;;&lt;br /&gt;
    this.label1.Size = new System.Drawing.Size(224, 32);&lt;br /&gt;
    this.label1.TabIndex = 2;&lt;br /&gt;
    this.label1.Text = &amp;quot;Domain UpDown Control&amp;quot;;&lt;br /&gt;
    // &lt;br /&gt;
    // label2&lt;br /&gt;
    // &lt;br /&gt;
    this.label2.Font = new System.Drawing.Font(&amp;quot;Verdana&amp;quot;, 12F);&lt;br /&gt;
    this.label2.Location = new System.Drawing.Point(8, 80);&lt;br /&gt;
    this.label2.Name = &amp;quot;label2&amp;quot;;&lt;br /&gt;
    this.label2.Size = new System.Drawing.Size(232, 32);&lt;br /&gt;
    this.label2.TabIndex = 3;&lt;br /&gt;
    this.label2.Text = &amp;quot;Numeric UpDown Control&amp;quot;;&lt;br /&gt;
    // &lt;br /&gt;
    // numericUpDown&lt;br /&gt;
    // &lt;br /&gt;
    this.numericUpDown.Location = new System.Drawing.Point(264, 80);&lt;br /&gt;
    this.numericUpDown.Maximum = new System.Decimal(new int[] {&lt;br /&gt;
                                    5000,&lt;br /&gt;
                                    0,&lt;br /&gt;
                                    0,&lt;br /&gt;
                                    0});&lt;br /&gt;
    this.numericUpDown.Name = &amp;quot;numericUpDown&amp;quot;;&lt;br /&gt;
    this.numericUpDown.Size = new System.Drawing.Size(168, 20);&lt;br /&gt;
    this.numericUpDown.TabIndex = 1;&lt;br /&gt;
    this.numericUpDown.ThousandsSeparator = true;&lt;br /&gt;
    this.numericUpDown.UpDownAlign = System.Windows.Forms.LeftRightAlignment.Left;&lt;br /&gt;
    this.numericUpDown.ValueChanged += new System.EventHandler(this.numericUpDown_ValueChanged);&lt;br /&gt;
    // &lt;br /&gt;
    // domainUpDown&lt;br /&gt;
    // &lt;br /&gt;
    this.domainUpDown.Items.Add(&amp;quot;A&amp;quot;);&lt;br /&gt;
    this.domainUpDown.Items.Add(&amp;quot;B&amp;quot;);&lt;br /&gt;
    this.domainUpDown.Items.Add(&amp;quot;C&amp;quot;);&lt;br /&gt;
    this.domainUpDown.Items.Add(&amp;quot;D&amp;quot;);&lt;br /&gt;
    this.domainUpDown.Location = new System.Drawing.Point(264, 24);&lt;br /&gt;
    this.domainUpDown.Name = &amp;quot;domainUpDown&amp;quot;;&lt;br /&gt;
    this.domainUpDown.Size = new System.Drawing.Size(168, 20);&lt;br /&gt;
    this.domainUpDown.Sorted = true;&lt;br /&gt;
    this.domainUpDown.TabIndex = 0;&lt;br /&gt;
    this.domainUpDown.Text = &amp;quot;domainUpDown1&amp;quot;;&lt;br /&gt;
    this.domainUpDown.Wrap = true;&lt;br /&gt;
    this.domainUpDown.SelectedItemChanged += new System.EventHandler(this.domainUpDown_SelectedItemChanged);&lt;br /&gt;
    // &lt;br /&gt;
    // btnGetSelections&lt;br /&gt;
    // &lt;br /&gt;
    this.btnGetSelections.Location = new System.Drawing.Point(16, 136);&lt;br /&gt;
    this.btnGetSelections.Name = &amp;quot;btnGetSelections&amp;quot;;&lt;br /&gt;
    this.btnGetSelections.Size = new System.Drawing.Size(136, 24);&lt;br /&gt;
    this.btnGetSelections.TabIndex = 4;&lt;br /&gt;
    this.btnGetSelections.Text = &amp;quot;Get Current Selections&amp;quot;;&lt;br /&gt;
    this.btnGetSelections.Click += new System.EventHandler(this.btnGetSelections_Click);&lt;br /&gt;
    // &lt;br /&gt;
    // lblCurrSel&lt;br /&gt;
    // &lt;br /&gt;
    this.lblCurrSel.BackColor = System.Drawing.Color.Linen;&lt;br /&gt;
    this.lblCurrSel.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;&lt;br /&gt;
    this.lblCurrSel.Location = new System.Drawing.Point(176, 120);&lt;br /&gt;
    this.lblCurrSel.Name = &amp;quot;lblCurrSel&amp;quot;;&lt;br /&gt;
    this.lblCurrSel.Size = new System.Drawing.Size(256, 48);&lt;br /&gt;
    this.lblCurrSel.TabIndex = 5;&lt;br /&gt;
    // &lt;br /&gt;
    // UpDownForm&lt;br /&gt;
    // &lt;br /&gt;
    this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);&lt;br /&gt;
    this.ClientSize = new System.Drawing.Size(448, 181);&lt;br /&gt;
    this.Controls.Add(this.lblCurrSel);&lt;br /&gt;
    this.Controls.Add(this.btnGetSelections);&lt;br /&gt;
    this.Controls.Add(this.label2);&lt;br /&gt;
    this.Controls.Add(this.label1);&lt;br /&gt;
    this.Controls.Add(this.numericUpDown);&lt;br /&gt;
    this.Controls.Add(this.domainUpDown);&lt;br /&gt;
    this.Name = &amp;quot;UpDownForm&amp;quot;;&lt;br /&gt;
    this.Text = &amp;quot;Spin Controls&amp;quot;;&lt;br /&gt;
    ((System.ruponentModel.ISupportInitialize)(this.numericUpDown)).EndInit();&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.Run(new UpDownForm());&lt;br /&gt;
  }&lt;br /&gt;
  protected void numericUpDown_ValueChanged (object sender, System.EventArgs e)&lt;br /&gt;
  {&lt;br /&gt;
    this.Text = &amp;quot;You changed the numeric value...&amp;quot;;&lt;br /&gt;
  }&lt;br /&gt;
  protected void domainUpDown_SelectedItemChanged (object sender, System.EventArgs e)&lt;br /&gt;
  {&lt;br /&gt;
    this.Text = &amp;quot;You changed the string value...&amp;quot;;&lt;br /&gt;
  }&lt;br /&gt;
  protected void btnGetSelections_Click (object sender, System.EventArgs e)&lt;br /&gt;
  {&lt;br /&gt;
    // Get info from updowns...&lt;br /&gt;
    lblCurrSel.Text = string.Format(&amp;quot;String: {0}\nNumber: {1}&amp;quot;, domainUpDown.Text, numericUpDown.Value);&lt;br /&gt;
  }&lt;br /&gt;
}&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==NumericUpDown: set value, Minimum, Maximum, Increment, Decimal places, Readonly, TextAlign==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
&amp;lt;source lang=&amp;quot;csharp&amp;quot;&amp;gt;using System;&lt;br /&gt;
using System.Drawing;&lt;br /&gt;
using System.Windows.Forms;&lt;br /&gt;
public class NumericUpDowns : Form&lt;br /&gt;
{&lt;br /&gt;
  NumericUpDown nupdwn;&lt;br /&gt;
  public NumericUpDowns()&lt;br /&gt;
  {&lt;br /&gt;
    Size = new Size(480,580);&lt;br /&gt;
    nupdwn = new NumericUpDown();&lt;br /&gt;
    nupdwn.Parent = this;&lt;br /&gt;
    nupdwn.Location = new Point(50, 50);&lt;br /&gt;
    nupdwn.Size = new Size(60,20);&lt;br /&gt;
    nupdwn.Value = 1;&lt;br /&gt;
    nupdwn.Minimum = -10;&lt;br /&gt;
    nupdwn.Maximum = 10;&lt;br /&gt;
    nupdwn.Increment = .25m;    //  decimal&lt;br /&gt;
    nupdwn.DecimalPlaces = 2;&lt;br /&gt;
    nupdwn.ReadOnly = true;&lt;br /&gt;
    nupdwn.TextAlign = HorizontalAlignment.Right;&lt;br /&gt;
    nupdwn.ValueChanged += new EventHandler(nupdwn_OnValueChanged);&lt;br /&gt;
  }  &lt;br /&gt;
  private void nupdwn_OnValueChanged(object sender, EventArgs e)&lt;br /&gt;
  {&lt;br /&gt;
    Console.WriteLine(nupdwn.Value);&lt;br /&gt;
  }&lt;br /&gt;
  static void Main() &lt;br /&gt;
  {&lt;br /&gt;
    Application.Run(new NumericUpDowns());&lt;br /&gt;
  }&lt;br /&gt;
}&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==NumericUpDown validated event==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
&amp;lt;source lang=&amp;quot;csharp&amp;quot;&amp;gt;using System;&lt;br /&gt;
using System.ruponentModel;&lt;br /&gt;
using System.Drawing;&lt;br /&gt;
using System.Windows.Forms;&lt;br /&gt;
using System.IO;&lt;br /&gt;
using System.Text;&lt;br /&gt;
class DialogValid : System.Windows.Forms.Form&lt;br /&gt;
{&lt;br /&gt;
    private Button okButton;&lt;br /&gt;
    private Button cancelButton;&lt;br /&gt;
    private NumericUpDown num;&lt;br /&gt;
    public decimal Num {&lt;br /&gt;
        get { return num.Value; }&lt;br /&gt;
        set { num.Value = value;    }&lt;br /&gt;
    }&lt;br /&gt;
    void OnValidating(Object sender, CancelEventArgs e)&lt;br /&gt;
    {&lt;br /&gt;
        MessageBox.Show(&amp;quot;NumericUpDown is validating&amp;quot;);&lt;br /&gt;
    } &lt;br /&gt;
    void OnValid(Object sender,EventArgs e)&lt;br /&gt;
    {&lt;br /&gt;
        MessageBox.Show(&amp;quot;NumericUpDown is valid&amp;quot;);&lt;br /&gt;
    } &lt;br /&gt;
    public DialogValid()&lt;br /&gt;
    {&lt;br /&gt;
        Size = new Size(400,100);&lt;br /&gt;
        FormBorderStyle = FormBorderStyle.FixedDialog;&lt;br /&gt;
        Text = &amp;quot;Dialog test&amp;quot;;&lt;br /&gt;
        okButton = new Button();        &lt;br /&gt;
        okButton.DialogResult = DialogResult.OK;&lt;br /&gt;
        okButton.Location = new Point(20,28);&lt;br /&gt;
        okButton.Size = new Size(80,25);&lt;br /&gt;
        okButton.Text = &amp;quot;OK&amp;quot;;&lt;br /&gt;
        Controls.Add(okButton);&lt;br /&gt;
        cancelButton = new Button();&lt;br /&gt;
        cancelButton.Location = new Point(300,28);&lt;br /&gt;
        cancelButton.Size = new Size(80,25);&lt;br /&gt;
        cancelButton.Text = &amp;quot;Cancel&amp;quot;;&lt;br /&gt;
        cancelButton.DialogResult = DialogResult.Cancel;&lt;br /&gt;
        Controls.Add(cancelButton);&lt;br /&gt;
        Label l = new Label();&lt;br /&gt;
        l.Text = &amp;quot;NumericUpDown&amp;quot;;&lt;br /&gt;
        l.Location = new Point(20,5);&lt;br /&gt;
        l.Size = new Size(120,25);&lt;br /&gt;
        Controls.Add(l);&lt;br /&gt;
        num = new NumericUpDown();&lt;br /&gt;
        num.Location = new Point(140,5);&lt;br /&gt;
        num.Size = new Size(80,25);&lt;br /&gt;
        num.Minimum = (decimal)10.0;&lt;br /&gt;
        num.Maximum = (decimal)100.0;&lt;br /&gt;
        num.Value = (decimal)10.0;&lt;br /&gt;
        &lt;br /&gt;
        num.Validating+=new CancelEventHandler(OnValidating);&lt;br /&gt;
        num.Validated+=new EventHandler(OnValid);&lt;br /&gt;
        Controls.Add(num);&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
public class NumericUpDownValidationEvent{&lt;br /&gt;
    public static void Main()&lt;br /&gt;
    {&lt;br /&gt;
        DialogValid dlg = new DialogValid();&lt;br /&gt;
        DialogResult r = dlg.ShowDialog();&lt;br /&gt;
        &lt;br /&gt;
        Console.WriteLine(dlg.Num);&lt;br /&gt;
    }&lt;br /&gt;
}&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==NumericUpDown validating event==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
&amp;lt;source lang=&amp;quot;csharp&amp;quot;&amp;gt;using System;&lt;br /&gt;
using System.ruponentModel;&lt;br /&gt;
using System.Drawing;&lt;br /&gt;
using System.Windows.Forms;&lt;br /&gt;
using System.IO;&lt;br /&gt;
using System.Text;&lt;br /&gt;
class DialogValid : System.Windows.Forms.Form&lt;br /&gt;
{&lt;br /&gt;
    private Button okButton;&lt;br /&gt;
    private Button cancelButton;&lt;br /&gt;
    private NumericUpDown num;&lt;br /&gt;
    public decimal Num {&lt;br /&gt;
        get { return num.Value; }&lt;br /&gt;
        set { num.Value = value;    }&lt;br /&gt;
    }&lt;br /&gt;
    void OnValidating(Object sender, CancelEventArgs e)&lt;br /&gt;
    {&lt;br /&gt;
        MessageBox.Show(&amp;quot;NumericUpDown is validating&amp;quot;);&lt;br /&gt;
    } &lt;br /&gt;
    void OnValid(Object sender,EventArgs e)&lt;br /&gt;
    {&lt;br /&gt;
        MessageBox.Show(&amp;quot;NumericUpDown is valid&amp;quot;);&lt;br /&gt;
    } &lt;br /&gt;
    public DialogValid()&lt;br /&gt;
    {&lt;br /&gt;
        Size = new Size(400,100);&lt;br /&gt;
        FormBorderStyle = FormBorderStyle.FixedDialog;&lt;br /&gt;
        Text = &amp;quot;Dialog test&amp;quot;;&lt;br /&gt;
        okButton = new Button();        &lt;br /&gt;
        okButton.DialogResult = DialogResult.OK;&lt;br /&gt;
        okButton.Location = new Point(20,28);&lt;br /&gt;
        okButton.Size = new Size(80,25);&lt;br /&gt;
        okButton.Text = &amp;quot;OK&amp;quot;;&lt;br /&gt;
        Controls.Add(okButton);&lt;br /&gt;
        cancelButton = new Button();&lt;br /&gt;
        cancelButton.Location = new Point(300,28);&lt;br /&gt;
        cancelButton.Size = new Size(80,25);&lt;br /&gt;
        cancelButton.Text = &amp;quot;Cancel&amp;quot;;&lt;br /&gt;
        cancelButton.DialogResult = DialogResult.Cancel;&lt;br /&gt;
        Controls.Add(cancelButton);&lt;br /&gt;
        Label l = new Label();&lt;br /&gt;
        l.Text = &amp;quot;NumericUpDown&amp;quot;;&lt;br /&gt;
        l.Location = new Point(20,5);&lt;br /&gt;
        l.Size = new Size(120,25);&lt;br /&gt;
        Controls.Add(l);&lt;br /&gt;
        num = new NumericUpDown();&lt;br /&gt;
        num.Location = new Point(140,5);&lt;br /&gt;
        num.Size = new Size(80,25);&lt;br /&gt;
        num.Minimum = (decimal)10.0;&lt;br /&gt;
        num.Maximum = (decimal)100.0;&lt;br /&gt;
        num.Value = (decimal)10.0;&lt;br /&gt;
        &lt;br /&gt;
        num.Validating+=new CancelEventHandler(OnValidating);&lt;br /&gt;
        num.Validated+=new EventHandler(OnValid);&lt;br /&gt;
        Controls.Add(num);&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
public class NumericUpDownValidationEvent{&lt;br /&gt;
    public static void Main()&lt;br /&gt;
    {&lt;br /&gt;
        DialogValid dlg = new DialogValid();&lt;br /&gt;
        DialogResult r = dlg.ShowDialog();&lt;br /&gt;
        &lt;br /&gt;
        Console.WriteLine(dlg.Num);&lt;br /&gt;
    }&lt;br /&gt;
}&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==NumericUpDown: value changed event==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
&amp;lt;source lang=&amp;quot;csharp&amp;quot;&amp;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 UpDownForm : System.Windows.Forms.Form&lt;br /&gt;
{&lt;br /&gt;
  private System.ruponentModel.Container components = null;&lt;br /&gt;
  private System.Windows.Forms.Label lblCurrSel;&lt;br /&gt;
  private System.Windows.Forms.Button btnGetSelections;&lt;br /&gt;
  private System.Windows.Forms.Label label2;&lt;br /&gt;
  private System.Windows.Forms.Label label1;&lt;br /&gt;
  private System.Windows.Forms.NumericUpDown numericUpDown;&lt;br /&gt;
  private System.Windows.Forms.DomainUpDown domainUpDown;&lt;br /&gt;
  public UpDownForm()&lt;br /&gt;
  {&lt;br /&gt;
    InitializeComponent();&lt;br /&gt;
    domainUpDown.SelectedIndex = 2;&lt;br /&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;
  private void InitializeComponent()&lt;br /&gt;
  {&lt;br /&gt;
    this.label1 = new System.Windows.Forms.Label();&lt;br /&gt;
    this.label2 = new System.Windows.Forms.Label();&lt;br /&gt;
    this.numericUpDown = new System.Windows.Forms.NumericUpDown();&lt;br /&gt;
    this.domainUpDown = new System.Windows.Forms.DomainUpDown();&lt;br /&gt;
    this.btnGetSelections = new System.Windows.Forms.Button();&lt;br /&gt;
    this.lblCurrSel = new System.Windows.Forms.Label();&lt;br /&gt;
    ((System.ruponentModel.ISupportInitialize)(this.numericUpDown)).BeginInit();&lt;br /&gt;
    this.SuspendLayout();&lt;br /&gt;
    // &lt;br /&gt;
    // label1&lt;br /&gt;
    // &lt;br /&gt;
    this.label1.Font = new System.Drawing.Font(&amp;quot;Verdana&amp;quot;, 12F);&lt;br /&gt;
    this.label1.Location = new System.Drawing.Point(8, 24);&lt;br /&gt;
    this.label1.Name = &amp;quot;label1&amp;quot;;&lt;br /&gt;
    this.label1.Size = new System.Drawing.Size(224, 32);&lt;br /&gt;
    this.label1.TabIndex = 2;&lt;br /&gt;
    this.label1.Text = &amp;quot;Domain UpDown Control&amp;quot;;&lt;br /&gt;
    // &lt;br /&gt;
    // label2&lt;br /&gt;
    // &lt;br /&gt;
    this.label2.Font = new System.Drawing.Font(&amp;quot;Verdana&amp;quot;, 12F);&lt;br /&gt;
    this.label2.Location = new System.Drawing.Point(8, 80);&lt;br /&gt;
    this.label2.Name = &amp;quot;label2&amp;quot;;&lt;br /&gt;
    this.label2.Size = new System.Drawing.Size(232, 32);&lt;br /&gt;
    this.label2.TabIndex = 3;&lt;br /&gt;
    this.label2.Text = &amp;quot;Numeric UpDown Control&amp;quot;;&lt;br /&gt;
    // &lt;br /&gt;
    // numericUpDown&lt;br /&gt;
    // &lt;br /&gt;
    this.numericUpDown.Location = new System.Drawing.Point(264, 80);&lt;br /&gt;
    this.numericUpDown.Maximum = new System.Decimal(new int[] {&lt;br /&gt;
                                    5000,&lt;br /&gt;
                                    0,&lt;br /&gt;
                                    0,&lt;br /&gt;
                                    0});&lt;br /&gt;
    this.numericUpDown.Name = &amp;quot;numericUpDown&amp;quot;;&lt;br /&gt;
    this.numericUpDown.Size = new System.Drawing.Size(168, 20);&lt;br /&gt;
    this.numericUpDown.TabIndex = 1;&lt;br /&gt;
    this.numericUpDown.ThousandsSeparator = true;&lt;br /&gt;
    this.numericUpDown.UpDownAlign = System.Windows.Forms.LeftRightAlignment.Left;&lt;br /&gt;
    this.numericUpDown.ValueChanged += new System.EventHandler(this.numericUpDown_ValueChanged);&lt;br /&gt;
    // &lt;br /&gt;
    // domainUpDown&lt;br /&gt;
    // &lt;br /&gt;
    this.domainUpDown.Items.Add(&amp;quot;A&amp;quot;);&lt;br /&gt;
    this.domainUpDown.Items.Add(&amp;quot;B&amp;quot;);&lt;br /&gt;
    this.domainUpDown.Items.Add(&amp;quot;C&amp;quot;);&lt;br /&gt;
    this.domainUpDown.Items.Add(&amp;quot;D&amp;quot;);&lt;br /&gt;
    this.domainUpDown.Location = new System.Drawing.Point(264, 24);&lt;br /&gt;
    this.domainUpDown.Name = &amp;quot;domainUpDown&amp;quot;;&lt;br /&gt;
    this.domainUpDown.Size = new System.Drawing.Size(168, 20);&lt;br /&gt;
    this.domainUpDown.Sorted = true;&lt;br /&gt;
    this.domainUpDown.TabIndex = 0;&lt;br /&gt;
    this.domainUpDown.Text = &amp;quot;domainUpDown1&amp;quot;;&lt;br /&gt;
    this.domainUpDown.Wrap = true;&lt;br /&gt;
    this.domainUpDown.SelectedItemChanged += new System.EventHandler(this.domainUpDown_SelectedItemChanged);&lt;br /&gt;
    // &lt;br /&gt;
    // btnGetSelections&lt;br /&gt;
    // &lt;br /&gt;
    this.btnGetSelections.Location = new System.Drawing.Point(16, 136);&lt;br /&gt;
    this.btnGetSelections.Name = &amp;quot;btnGetSelections&amp;quot;;&lt;br /&gt;
    this.btnGetSelections.Size = new System.Drawing.Size(136, 24);&lt;br /&gt;
    this.btnGetSelections.TabIndex = 4;&lt;br /&gt;
    this.btnGetSelections.Text = &amp;quot;Get Current Selections&amp;quot;;&lt;br /&gt;
    this.btnGetSelections.Click += new System.EventHandler(this.btnGetSelections_Click);&lt;br /&gt;
    // &lt;br /&gt;
    // lblCurrSel&lt;br /&gt;
    // &lt;br /&gt;
    this.lblCurrSel.BackColor = System.Drawing.Color.Linen;&lt;br /&gt;
    this.lblCurrSel.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;&lt;br /&gt;
    this.lblCurrSel.Location = new System.Drawing.Point(176, 120);&lt;br /&gt;
    this.lblCurrSel.Name = &amp;quot;lblCurrSel&amp;quot;;&lt;br /&gt;
    this.lblCurrSel.Size = new System.Drawing.Size(256, 48);&lt;br /&gt;
    this.lblCurrSel.TabIndex = 5;&lt;br /&gt;
    // &lt;br /&gt;
    // UpDownForm&lt;br /&gt;
    // &lt;br /&gt;
    this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);&lt;br /&gt;
    this.ClientSize = new System.Drawing.Size(448, 181);&lt;br /&gt;
    this.Controls.Add(this.lblCurrSel);&lt;br /&gt;
    this.Controls.Add(this.btnGetSelections);&lt;br /&gt;
    this.Controls.Add(this.label2);&lt;br /&gt;
    this.Controls.Add(this.label1);&lt;br /&gt;
    this.Controls.Add(this.numericUpDown);&lt;br /&gt;
    this.Controls.Add(this.domainUpDown);&lt;br /&gt;
    this.Name = &amp;quot;UpDownForm&amp;quot;;&lt;br /&gt;
    this.Text = &amp;quot;Spin Controls&amp;quot;;&lt;br /&gt;
    ((System.ruponentModel.ISupportInitialize)(this.numericUpDown)).EndInit();&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.Run(new UpDownForm());&lt;br /&gt;
  }&lt;br /&gt;
  protected void numericUpDown_ValueChanged (object sender, System.EventArgs e)&lt;br /&gt;
  {&lt;br /&gt;
    this.Text = &amp;quot;You changed the numeric value...&amp;quot;;&lt;br /&gt;
  }&lt;br /&gt;
  protected void domainUpDown_SelectedItemChanged (object sender, System.EventArgs e)&lt;br /&gt;
  {&lt;br /&gt;
    this.Text = &amp;quot;You changed the string value...&amp;quot;;&lt;br /&gt;
  }&lt;br /&gt;
  protected void btnGetSelections_Click (object sender, System.EventArgs e)&lt;br /&gt;
  {&lt;br /&gt;
    // Get info from updowns...&lt;br /&gt;
    lblCurrSel.Text = string.Format(&amp;quot;String: {0}\nNumber: {1}&amp;quot;, domainUpDown.Text, numericUpDown.Value);&lt;br /&gt;
  }&lt;br /&gt;
}&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==NumericUpDown Value changed event handler==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
&amp;lt;source lang=&amp;quot;csharp&amp;quot;&amp;gt;using System;&lt;br /&gt;
using System.Drawing;&lt;br /&gt;
using System.Windows.Forms;&lt;br /&gt;
public class NumericUpDowns : Form&lt;br /&gt;
{&lt;br /&gt;
  NumericUpDown nupdwn;&lt;br /&gt;
  public NumericUpDowns()&lt;br /&gt;
  {&lt;br /&gt;
    Size = new Size(480,580);&lt;br /&gt;
    nupdwn = new NumericUpDown();&lt;br /&gt;
    nupdwn.Parent = this;&lt;br /&gt;
    nupdwn.Location = new Point(50, 50);&lt;br /&gt;
    nupdwn.Size = new Size(60,20);&lt;br /&gt;
    nupdwn.Value = 1;&lt;br /&gt;
    nupdwn.Minimum = -10;&lt;br /&gt;
    nupdwn.Maximum = 10;&lt;br /&gt;
    nupdwn.Increment = .25m;    //  decimal&lt;br /&gt;
    nupdwn.DecimalPlaces = 2;&lt;br /&gt;
    nupdwn.ReadOnly = true;&lt;br /&gt;
    nupdwn.TextAlign = HorizontalAlignment.Right;&lt;br /&gt;
    nupdwn.ValueChanged += new EventHandler(nupdwn_OnValueChanged);&lt;br /&gt;
  }  &lt;br /&gt;
  private void nupdwn_OnValueChanged(object sender, EventArgs e)&lt;br /&gt;
  {&lt;br /&gt;
    Console.WriteLine(nupdwn.Value);&lt;br /&gt;
  }&lt;br /&gt;
  static void Main() &lt;br /&gt;
  {&lt;br /&gt;
    Application.Run(new NumericUpDowns());&lt;br /&gt;
  }&lt;br /&gt;
}&amp;lt;/source&amp;gt;&lt;/div&gt;</summary>
		<author><name>Admin</name></author>	</entry>

	</feed>