<?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%2FRadioButton</id>
		<title>Csharp/CSharp Tutorial/GUI Windows Forms/RadioButton - История изменений</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%2FRadioButton"/>
		<link rel="alternate" type="text/html" href="http://nfex.ru/index.php?title=Csharp/CSharp_Tutorial/GUI_Windows_Forms/RadioButton&amp;action=history"/>
		<updated>2026-04-30T02:21:35Z</updated>
		<subtitle>История изменений этой страницы в вики</subtitle>
		<generator>MediaWiki 1.30.0</generator>

	<entry>
		<id>http://nfex.ru/index.php?title=Csharp/CSharp_Tutorial/GUI_Windows_Forms/RadioButton&amp;diff=5389&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/RadioButton&amp;diff=5389&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/RadioButton&amp;diff=5390&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/RadioButton&amp;diff=5390&amp;oldid=prev"/>
				<updated>2010-05-26T12:15:15Z</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;==Color Radio Buttons==&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;
class ColorRadioButtons : Form&lt;br /&gt;
{&lt;br /&gt;
    public static void Main()&lt;br /&gt;
    {&lt;br /&gt;
        Application.EnableVisualStyles();&lt;br /&gt;
        Application.Run(new ColorRadioButtons());&lt;br /&gt;
    }&lt;br /&gt;
    public ColorRadioButtons()&lt;br /&gt;
    {&lt;br /&gt;
        Color[] aclr = { Color.Red, Color.Orange, Color.Yellow};&lt;br /&gt;
        int y = Font.Height;&lt;br /&gt;
        foreach (Color clr in aclr)&lt;br /&gt;
        {&lt;br /&gt;
            RadioButton radio = new RadioButton();&lt;br /&gt;
            radio.Parent = this;&lt;br /&gt;
            radio.Location = new Point(Font.Height, y);&lt;br /&gt;
            radio.Text = clr.Name;&lt;br /&gt;
            radio.Tag = clr;&lt;br /&gt;
            radio.CheckedChanged += RadioButtonOnCheckedChanged;&lt;br /&gt;
            y += radio.Height;&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
    void RadioButtonOnCheckedChanged(object objSrc, EventArgs args)&lt;br /&gt;
    {&lt;br /&gt;
        RadioButton radio = objSrc as RadioButton;&lt;br /&gt;
        BackColor = (Color)radio.Tag;&lt;br /&gt;
    }&lt;br /&gt;
}&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Put RadioButton to panel group==&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 MyDialog : System.Windows.Forms.Form&lt;br /&gt;
{&lt;br /&gt;
  private Button okButton;&lt;br /&gt;
  private Button cancelButton;&lt;br /&gt;
  private CheckBox checkbox;&lt;br /&gt;
  private GroupBox radiogroup;&lt;br /&gt;
  private RadioButton radio1,radio2,radio3;&lt;br /&gt;
  public int Radio;&lt;br /&gt;
  public bool Check {&lt;br /&gt;
    get { return checkbox.Checked; }&lt;br /&gt;
    set { checkbox.Checked = value;}&lt;br /&gt;
    }&lt;br /&gt;
  void OnRadio(Object sender,EventArgs e)&lt;br /&gt;
  {&lt;br /&gt;
    int n=0;&lt;br /&gt;
    foreach(Object o in radiogroup.Controls)&lt;br /&gt;
    {&lt;br /&gt;
      if(o is RadioButton)&lt;br /&gt;
      {&lt;br /&gt;
        RadioButton r=(RadioButton)o;&lt;br /&gt;
        if(r.Checked)&lt;br /&gt;
          Radio=n;&lt;br /&gt;
        n++;&lt;br /&gt;
      }&lt;br /&gt;
    }&lt;br /&gt;
  }&lt;br /&gt;
  public MyDialog()&lt;br /&gt;
  {&lt;br /&gt;
    Size = new Size(400,300);&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,230);&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,230);&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;
    checkbox = new CheckBox();&lt;br /&gt;
    checkbox.Location = new Point(20,30);&lt;br /&gt;
    checkbox.Size = new Size(300,25);&lt;br /&gt;
    checkbox.Text = &amp;quot;CheckBox&amp;quot;;&lt;br /&gt;
    Controls.Add(checkbox);&lt;br /&gt;
    radiogroup = new GroupBox();&lt;br /&gt;
    radiogroup.Text = &amp;quot;Radio Buttons&amp;quot;;&lt;br /&gt;
    radiogroup.Location = new Point(10,60);&lt;br /&gt;
    radiogroup.Size = new Size(380,110);&lt;br /&gt;
    Controls.Add(radiogroup);&lt;br /&gt;
    radio1 = new RadioButton();&lt;br /&gt;
    radio1.Location = new Point(10,15); &lt;br /&gt;
    radio1.Size = new Size(360,25);&lt;br /&gt;
    radio1.Click += new EventHandler(OnRadio);&lt;br /&gt;
    radio1.Text = &amp;quot;Radio Button #1&amp;quot;;&lt;br /&gt;
    radiogroup.Controls.Add(radio1);&lt;br /&gt;
&lt;br /&gt;
    radio2 = new RadioButton();&lt;br /&gt;
    radio2.Location = new Point(10,40); &lt;br /&gt;
    radio2.Size = new Size(360,25);&lt;br /&gt;
    radio2.Click += new EventHandler(OnRadio);&lt;br /&gt;
    radio2.Text = &amp;quot;Radio Button #2&amp;quot;;&lt;br /&gt;
    radiogroup.Controls.Add(radio2);&lt;br /&gt;
&lt;br /&gt;
    radio3 = new RadioButton();&lt;br /&gt;
    radio3.Location = new Point(10,70); &lt;br /&gt;
    radio3.Size = new Size(360,25);&lt;br /&gt;
    radio3.Click += new EventHandler(OnRadio);&lt;br /&gt;
    radio3.Text = &amp;quot;Radio Button #3&amp;quot;;&lt;br /&gt;
    radiogroup.Controls.Add(radio3);&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
public class CustomDialogTest{&lt;br /&gt;
  public static void Main()&lt;br /&gt;
  {&lt;br /&gt;
    MyDialog dlg = new MyDialog();&lt;br /&gt;
    DialogResult r=dlg.ShowDialog();&lt;br /&gt;
    &lt;br /&gt;
      Console.WriteLine(dlg.Radio);&lt;br /&gt;
      Console.WriteLine(dlg.Check);&lt;br /&gt;
    &lt;br /&gt;
  }&lt;br /&gt;
}&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==RadioButton Click 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.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 partial class Form1 : Form&lt;br /&gt;
{&lt;br /&gt;
    string ticketClass;&lt;br /&gt;
    &lt;br /&gt;
    public Form1()&lt;br /&gt;
    {&lt;br /&gt;
        InitializeComponent();&lt;br /&gt;
    }&lt;br /&gt;
    private void okButton_Click(object sender, EventArgs e)&lt;br /&gt;
    {&lt;br /&gt;
        MessageBox.Show(ticketClass);&lt;br /&gt;
    }&lt;br /&gt;
    private void TicketTypeChanged(object sender, EventArgs e)&lt;br /&gt;
    {&lt;br /&gt;
        RadioButton button = (RadioButton)sender;&lt;br /&gt;
        if (button.Checked)&lt;br /&gt;
            ticketClass = button.Text;&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
partial class Form1&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.economyRadio = new System.Windows.Forms.RadioButton();&lt;br /&gt;
        this.premiumRadio = new System.Windows.Forms.RadioButton();&lt;br /&gt;
        this.businessRadio = new System.Windows.Forms.RadioButton();&lt;br /&gt;
        this.upperRadio = new System.Windows.Forms.RadioButton();&lt;br /&gt;
        this.firstRadio = new System.Windows.Forms.RadioButton();&lt;br /&gt;
        this.okButton = new System.Windows.Forms.Button();&lt;br /&gt;
        this.SuspendLayout();&lt;br /&gt;
        // &lt;br /&gt;
        // label1&lt;br /&gt;
        // &lt;br /&gt;
        this.label1.AutoSize = true;&lt;br /&gt;
        this.label1.Location = new System.Drawing.Point(12, 9);&lt;br /&gt;
        this.label1.Name = &amp;quot;label1&amp;quot;;&lt;br /&gt;
        this.label1.Size = new System.Drawing.Size(168, 13);&lt;br /&gt;
        this.label1.TabIndex = 0;&lt;br /&gt;
        this.label1.Text = &amp;quot;Choose the cabin class you require&amp;quot;;&lt;br /&gt;
        // &lt;br /&gt;
        // economyRadio&lt;br /&gt;
        // &lt;br /&gt;
        this.economyRadio.AutoSize = true;&lt;br /&gt;
        this.economyRadio.Location = new System.Drawing.Point(46, 44);&lt;br /&gt;
        this.economyRadio.Name = &amp;quot;economyRadio&amp;quot;;&lt;br /&gt;
        this.economyRadio.Size = new System.Drawing.Size(65, 17);&lt;br /&gt;
        this.economyRadio.TabIndex = 1;&lt;br /&gt;
        this.economyRadio.Text = &amp;quot;Economy&amp;quot;;&lt;br /&gt;
        this.economyRadio.CheckedChanged += new System.EventHandler(this.TicketTypeChanged);&lt;br /&gt;
        // &lt;br /&gt;
        // premiumRadio&lt;br /&gt;
        // &lt;br /&gt;
        this.premiumRadio.AutoSize = true;&lt;br /&gt;
        this.premiumRadio.Location = new System.Drawing.Point(46, 68);&lt;br /&gt;
        this.premiumRadio.Name = &amp;quot;premiumRadio&amp;quot;;&lt;br /&gt;
        this.premiumRadio.Size = new System.Drawing.Size(108, 17);&lt;br /&gt;
        this.premiumRadio.TabIndex = 2;&lt;br /&gt;
        this.premiumRadio.Text = &amp;quot;Premium Economy&amp;quot;;&lt;br /&gt;
        this.premiumRadio.CheckedChanged += new System.EventHandler(this.TicketTypeChanged);&lt;br /&gt;
        // &lt;br /&gt;
        // businessRadio&lt;br /&gt;
        // &lt;br /&gt;
        this.businessRadio.AutoSize = true;&lt;br /&gt;
        this.businessRadio.Location = new System.Drawing.Point(46, 92);&lt;br /&gt;
        this.businessRadio.Name = &amp;quot;businessRadio&amp;quot;;&lt;br /&gt;
        this.businessRadio.Size = new System.Drawing.Size(90, 17);&lt;br /&gt;
        this.businessRadio.TabIndex = 3;&lt;br /&gt;
        this.businessRadio.Text = &amp;quot;Business class&amp;quot;;&lt;br /&gt;
        this.businessRadio.CheckedChanged += new System.EventHandler(this.TicketTypeChanged);&lt;br /&gt;
        // &lt;br /&gt;
        // upperRadio&lt;br /&gt;
        // &lt;br /&gt;
        this.upperRadio.AutoSize = true;&lt;br /&gt;
        this.upperRadio.Location = new System.Drawing.Point(46, 115);&lt;br /&gt;
        this.upperRadio.Name = &amp;quot;upperRadio&amp;quot;;&lt;br /&gt;
        this.upperRadio.Size = new System.Drawing.Size(123, 17);&lt;br /&gt;
        this.upperRadio.TabIndex = 4;&lt;br /&gt;
        this.upperRadio.Text = &amp;quot;Upper Business Class&amp;quot;;&lt;br /&gt;
        this.upperRadio.CheckedChanged += new System.EventHandler(this.TicketTypeChanged);&lt;br /&gt;
        // &lt;br /&gt;
        // firstRadio&lt;br /&gt;
        // &lt;br /&gt;
        this.firstRadio.AutoSize = true;&lt;br /&gt;
        this.firstRadio.Location = new System.Drawing.Point(46, 139);&lt;br /&gt;
        this.firstRadio.Name = &amp;quot;firstRadio&amp;quot;;&lt;br /&gt;
        this.firstRadio.Size = new System.Drawing.Size(67, 17);&lt;br /&gt;
        this.firstRadio.TabIndex = 5;&lt;br /&gt;
        this.firstRadio.Text = &amp;quot;First class&amp;quot;;&lt;br /&gt;
        this.firstRadio.CheckedChanged += new System.EventHandler(this.TicketTypeChanged);&lt;br /&gt;
        // &lt;br /&gt;
        // okButton&lt;br /&gt;
        // &lt;br /&gt;
        this.okButton.Location = new System.Drawing.Point(212, 194);&lt;br /&gt;
        this.okButton.Name = &amp;quot;okButton&amp;quot;;&lt;br /&gt;
        this.okButton.Size = new System.Drawing.Size(75, 23);&lt;br /&gt;
        this.okButton.TabIndex = 6;&lt;br /&gt;
        this.okButton.Text = &amp;quot;OK&amp;quot;;&lt;br /&gt;
        this.okButton.Click += new System.EventHandler(this.okButton_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.ClientSize = new System.Drawing.Size(299, 229);&lt;br /&gt;
        this.Controls.Add(this.okButton);&lt;br /&gt;
        this.Controls.Add(this.firstRadio);&lt;br /&gt;
        this.Controls.Add(this.upperRadio);&lt;br /&gt;
        this.Controls.Add(this.businessRadio);&lt;br /&gt;
        this.Controls.Add(this.premiumRadio);&lt;br /&gt;
        this.Controls.Add(this.economyRadio);&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;Flight Booker&amp;quot;;&lt;br /&gt;
        this.ResumeLayout(false);&lt;br /&gt;
        this.PerformLayout();&lt;br /&gt;
    }&lt;br /&gt;
    private System.Windows.Forms.Label label1;&lt;br /&gt;
    private System.Windows.Forms.RadioButton economyRadio;&lt;br /&gt;
    private System.Windows.Forms.RadioButton premiumRadio;&lt;br /&gt;
    private System.Windows.Forms.RadioButton businessRadio;&lt;br /&gt;
    private System.Windows.Forms.RadioButton upperRadio;&lt;br /&gt;
    private System.Windows.Forms.RadioButton firstRadio;&lt;br /&gt;
    private System.Windows.Forms.Button okButton;&lt;br /&gt;
}&lt;br /&gt;
public class RadioButtonClickEvent&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;
}&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==RadioButton Image==&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 Form1 : System.Windows.Forms.Form {&lt;br /&gt;
    private System.Windows.Forms.GroupBox groupBox1;&lt;br /&gt;
    private System.Windows.Forms.RadioButton radioButton1;&lt;br /&gt;
    private System.Windows.Forms.RadioButton radioButton2;&lt;br /&gt;
    private System.Windows.Forms.RadioButton radioButton3;&lt;br /&gt;
    public Form1() {&lt;br /&gt;
        this.groupBox1 = new System.Windows.Forms.GroupBox();&lt;br /&gt;
        this.radioButton3 = new System.Windows.Forms.RadioButton();&lt;br /&gt;
        this.radioButton2 = new System.Windows.Forms.RadioButton();&lt;br /&gt;
        this.radioButton1 = new System.Windows.Forms.RadioButton();&lt;br /&gt;
        this.groupBox1.SuspendLayout();&lt;br /&gt;
        this.SuspendLayout();&lt;br /&gt;
        this.groupBox1.Controls.AddRange(new System.Windows.Forms.Control[] {&lt;br /&gt;
this.radioButton3,&lt;br /&gt;
this.radioButton2,&lt;br /&gt;
this.radioButton1});&lt;br /&gt;
        this.groupBox1.Location = new System.Drawing.Point(8, 16);&lt;br /&gt;
        this.groupBox1.Size = new System.Drawing.Size(160, 120);&lt;br /&gt;
        this.groupBox1.TabStop = false;&lt;br /&gt;
        this.groupBox1.Text = &amp;quot;Group 1&amp;quot;;&lt;br /&gt;
        this.radioButton3.Appearance = System.Windows.Forms.Appearance.Button;&lt;br /&gt;
        this.radioButton3.BackColor = System.Drawing.Color.FromArgb(((System.Byte)(192)), ((System.Byte)(255)), ((System.Byte)(255)));&lt;br /&gt;
        this.radioButton3.FlatStyle = System.Windows.Forms.FlatStyle.Flat;&lt;br /&gt;
        this.radioButton3.Location = new System.Drawing.Point(16, 88);&lt;br /&gt;
        this.radioButton3.Name = &amp;quot;radioButton3&amp;quot;;&lt;br /&gt;
        this.radioButton3.Size = new System.Drawing.Size(120, 24);&lt;br /&gt;
        this.radioButton3.TabIndex = 2;&lt;br /&gt;
        this.radioButton3.Text = &amp;quot;Option3&amp;quot;;&lt;br /&gt;
        this.radioButton2.Appearance = System.Windows.Forms.Appearance.Button;&lt;br /&gt;
        this.radioButton2.BackColor = System.Drawing.Color.FromArgb(((System.Byte)(255)), ((System.Byte)(255)), ((System.Byte)(192)));&lt;br /&gt;
        this.radioButton2.Location = new System.Drawing.Point(16, 56);&lt;br /&gt;
        this.radioButton2.Size = new System.Drawing.Size(120, 24);&lt;br /&gt;
        this.radioButton2.Text = &amp;quot;Option2&amp;quot;;&lt;br /&gt;
        this.radioButton2.TextAlign = System.Drawing.ContentAlignment.MiddleRight;&lt;br /&gt;
        this.radioButton1.BackColor = System.Drawing.Color.FromArgb(((System.Byte)(255)), ((System.Byte)(192)), ((System.Byte)(192)));&lt;br /&gt;
        this.radioButton1.Location = new System.Drawing.Point(16, 24);&lt;br /&gt;
        this.radioButton1.Size = new System.Drawing.Size(120, 24);&lt;br /&gt;
        this.radioButton1.Text = &amp;quot;Option1&amp;quot;;&lt;br /&gt;
        this.radioButton1.CheckedChanged += new System.EventHandler(this.radioButton1_CheckedChanged);&lt;br /&gt;
        this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);&lt;br /&gt;
        this.ClientSize = new System.Drawing.Size(184, 149);&lt;br /&gt;
        this.Controls.AddRange(new System.Windows.Forms.Control[] {&lt;br /&gt;
this.groupBox1});&lt;br /&gt;
        this.Text = &amp;quot;Radio Button&amp;quot;;&lt;br /&gt;
        this.Load += new System.EventHandler(this.Form1_Load);&lt;br /&gt;
        this.groupBox1.ResumeLayout(false);&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;
        Image img = Image.FromFile(&amp;quot;EYE.ICO&amp;quot;);&lt;br /&gt;
        radioButton1.Image = img;&lt;br /&gt;
        radioButton1.ImageAlign = ContentAlignment.MiddleRight;&lt;br /&gt;
        img = Image.FromFile(&amp;quot;WRENCH.ICO&amp;quot;);&lt;br /&gt;
        radioButton2.Image = img;&lt;br /&gt;
        radioButton2.ImageAlign = ContentAlignment.MiddleLeft;&lt;br /&gt;
    }&lt;br /&gt;
    private void radioButton1_CheckedChanged(object sender, System.EventArgs e) {&lt;br /&gt;
        if (radioButton1.Checked)&lt;br /&gt;
            MessageBox.Show(&amp;quot;Checked!&amp;quot;);&lt;br /&gt;
        else&lt;br /&gt;
            MessageBox.Show(&amp;quot;Not checked!&amp;quot;);&lt;br /&gt;
    }&lt;br /&gt;
}&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Set DialogResult.OK/DialogResult.Cancel to OK/Cancel button==&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;/div&gt;</summary>
		<author><name>Admin</name></author>	</entry>

	</feed>