<?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_by_API%2FSystem.Windows.Forms%2FCheckBox</id>
		<title>Csharp/C Sharp by API/System.Windows.Forms/CheckBox - История изменений</title>
		<link rel="self" type="application/atom+xml" href="http://nfex.ru/index.php?action=history&amp;feed=atom&amp;title=Csharp%2FC_Sharp_by_API%2FSystem.Windows.Forms%2FCheckBox"/>
		<link rel="alternate" type="text/html" href="http://nfex.ru/index.php?title=Csharp/C_Sharp_by_API/System.Windows.Forms/CheckBox&amp;action=history"/>
		<updated>2026-04-30T10:00:13Z</updated>
		<subtitle>История изменений этой страницы в вики</subtitle>
		<generator>MediaWiki 1.30.0</generator>

	<entry>
		<id>http://nfex.ru/index.php?title=Csharp/C_Sharp_by_API/System.Windows.Forms/CheckBox&amp;diff=4128&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_by_API/System.Windows.Forms/CheckBox&amp;diff=4128&amp;oldid=prev"/>
				<updated>2010-05-26T15:31:35Z</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_by_API/System.Windows.Forms/CheckBox&amp;diff=4129&amp;oldid=prev</id>
		<title>Admin: 1 версия</title>
		<link rel="alternate" type="text/html" href="http://nfex.ru/index.php?title=Csharp/C_Sharp_by_API/System.Windows.Forms/CheckBox&amp;diff=4129&amp;oldid=prev"/>
				<updated>2010-05-26T12:09:24Z</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;==CheckBox.CheckAlign==&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;
    private System.Windows.Forms.Label label1;&lt;br /&gt;
    private System.Windows.Forms.GroupBox groupBox1;&lt;br /&gt;
    private System.Windows.Forms.CheckBox chk_option1;&lt;br /&gt;
    private System.Windows.Forms.CheckBox chk_option2;&lt;br /&gt;
    private System.Windows.Forms.CheckBox chk_option3;&lt;br /&gt;
    private System.Windows.Forms.CheckBox chk_option4;&lt;br /&gt;
    private System.Windows.Forms.Button button1;&lt;br /&gt;
    public Form1() {&lt;br /&gt;
        this.chk_option1 = new System.Windows.Forms.CheckBox();&lt;br /&gt;
        this.label1 = new System.Windows.Forms.Label();&lt;br /&gt;
        this.chk_option2 = new System.Windows.Forms.CheckBox();&lt;br /&gt;
        this.chk_option3 = new System.Windows.Forms.CheckBox();&lt;br /&gt;
        this.chk_option4 = new System.Windows.Forms.CheckBox();&lt;br /&gt;
        this.groupBox1 = new System.Windows.Forms.GroupBox();&lt;br /&gt;
        this.button1 = new System.Windows.Forms.Button();&lt;br /&gt;
        this.groupBox1.SuspendLayout();&lt;br /&gt;
        this.SuspendLayout();&lt;br /&gt;
        // &lt;br /&gt;
        // chk_option1&lt;br /&gt;
        // &lt;br /&gt;
        this.chk_option1.CheckAlign = System.Drawing.ContentAlignment.MiddleRight;&lt;br /&gt;
        this.chk_option1.Location = new System.Drawing.Point(40, 24);&lt;br /&gt;
        this.chk_option1.Name = &amp;quot;chk_option1&amp;quot;;&lt;br /&gt;
        this.chk_option1.Size = new System.Drawing.Size(192, 24);&lt;br /&gt;
        this.chk_option1.TabIndex = 0;&lt;br /&gt;
        this.chk_option1.Text = &amp;quot;Windows 2000 / Windows XP&amp;quot;;&lt;br /&gt;
        this.chk_option1.ThreeState = true;&lt;br /&gt;
        // &lt;br /&gt;
        // label1&lt;br /&gt;
        // &lt;br /&gt;
        this.label1.Location = new System.Drawing.Point(16, 24);&lt;br /&gt;
        this.label1.Name = &amp;quot;label1&amp;quot;;&lt;br /&gt;
        this.label1.Size = new System.Drawing.Size(296, 16);&lt;br /&gt;
        this.label1.TabIndex = 1;&lt;br /&gt;
        this.label1.Text = &amp;quot;The following products are developed by Microsoft Corp.&amp;quot;;&lt;br /&gt;
        // &lt;br /&gt;
        // chk_option2&lt;br /&gt;
        // &lt;br /&gt;
        this.chk_option2.Location = new System.Drawing.Point(40, 56);&lt;br /&gt;
        this.chk_option2.Name = &amp;quot;chk_option2&amp;quot;;&lt;br /&gt;
        this.chk_option2.Size = new System.Drawing.Size(192, 24);&lt;br /&gt;
        this.chk_option2.TabIndex = 0;&lt;br /&gt;
        this.chk_option2.Text = &amp;quot;JAVA&amp;quot;;&lt;br /&gt;
        // &lt;br /&gt;
        // chk_option3&lt;br /&gt;
        // &lt;br /&gt;
        this.chk_option3.Appearance = System.Windows.Forms.Appearance.Button;&lt;br /&gt;
        this.chk_option3.ImageAlign = System.Drawing.ContentAlignment.MiddleRight;&lt;br /&gt;
        this.chk_option3.Location = new System.Drawing.Point(40, 88);&lt;br /&gt;
        this.chk_option3.Name = &amp;quot;chk_option3&amp;quot;;&lt;br /&gt;
        this.chk_option3.Size = new System.Drawing.Size(192, 24);&lt;br /&gt;
        this.chk_option3.TabIndex = 0;&lt;br /&gt;
        this.chk_option3.Text = &amp;quot;Visual C# and .NET&amp;quot;;&lt;br /&gt;
        // &lt;br /&gt;
        // chk_option4&lt;br /&gt;
        // &lt;br /&gt;
        this.chk_option4.Appearance = System.Windows.Forms.Appearance.Button;&lt;br /&gt;
        this.chk_option4.FlatStyle = System.Windows.Forms.FlatStyle.Flat;&lt;br /&gt;
        this.chk_option4.Location = new System.Drawing.Point(40, 120);&lt;br /&gt;
        this.chk_option4.Name = &amp;quot;chk_option4&amp;quot;;&lt;br /&gt;
        this.chk_option4.Size = new System.Drawing.Size(192, 24);&lt;br /&gt;
        this.chk_option4.TabIndex = 0;&lt;br /&gt;
        this.chk_option4.Text = &amp;quot;Oracle Database&amp;quot;;&lt;br /&gt;
        // &lt;br /&gt;
        // groupBox1&lt;br /&gt;
        // &lt;br /&gt;
        this.groupBox1.Controls.AddRange(new System.Windows.Forms.Control[] {&lt;br /&gt;
                                          this.chk_option2,&lt;br /&gt;
                                          this.chk_option4,&lt;br /&gt;
                                          this.chk_option3,&lt;br /&gt;
                                          this.chk_option1});&lt;br /&gt;
        this.groupBox1.Location = new System.Drawing.Point(16, 56);&lt;br /&gt;
        this.groupBox1.Name = &amp;quot;groupBox1&amp;quot;;&lt;br /&gt;
        this.groupBox1.Size = new System.Drawing.Size(280, 152);&lt;br /&gt;
        this.groupBox1.TabIndex = 2;&lt;br /&gt;
        this.groupBox1.TabStop = false;&lt;br /&gt;
        this.groupBox1.Text = &amp;quot;Select All Correct Options&amp;quot;;&lt;br /&gt;
        // &lt;br /&gt;
        // button1&lt;br /&gt;
        // &lt;br /&gt;
        this.button1.Location = new System.Drawing.Point(16, 216);&lt;br /&gt;
        this.button1.Name = &amp;quot;button1&amp;quot;;&lt;br /&gt;
        this.button1.TabIndex = 3;&lt;br /&gt;
        this.button1.Text = &amp;quot;Done &amp;quot;;&lt;br /&gt;
        this.button1.Click += new System.EventHandler(this.button1_Click);&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(328, 253);&lt;br /&gt;
        this.Controls.AddRange(new System.Windows.Forms.Control[] {&lt;br /&gt;
                                      this.button1,&lt;br /&gt;
                                      this.groupBox1,&lt;br /&gt;
                                      this.label1});&lt;br /&gt;
        this.Name = &amp;quot;Form1&amp;quot;;&lt;br /&gt;
        this.Text = &amp;quot;Check Boxes&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;
&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;
        Application.Run(new Form1());&lt;br /&gt;
    }&lt;br /&gt;
    private void Form1_Load(object sender, System.EventArgs e) {&lt;br /&gt;
        Image imga = Image.FromFile(&amp;quot;A.ICO&amp;quot;);&lt;br /&gt;
        chk_option3.Image = imga;&lt;br /&gt;
        chk_option3.ImageAlign = ContentAlignment.MiddleRight;&lt;br /&gt;
        chk_option3.BackColor = Color.LightBlue;&lt;br /&gt;
        imga = Image.FromFile(&amp;quot;B.ICO&amp;quot;);&lt;br /&gt;
        chk_option4.Image = imga;&lt;br /&gt;
        chk_option4.ImageAlign = ContentAlignment.MiddleCenter;&lt;br /&gt;
        chk_option4.BackColor = Color.LightBlue;&lt;br /&gt;
    }&lt;br /&gt;
    private void button1_Click(object sender, System.EventArgs e) {&lt;br /&gt;
        string str_opt_selected = &amp;quot;Options Selected are ..\n&amp;quot;;&lt;br /&gt;
        if (chk_option1.Checked)&lt;br /&gt;
            str_opt_selected = str_opt_selected + chk_option1.Text + &amp;quot;\n&amp;quot;;&lt;br /&gt;
        if (chk_option2.Checked)&lt;br /&gt;
            str_opt_selected = str_opt_selected + chk_option2.Text + &amp;quot;\n&amp;quot;;&lt;br /&gt;
        if (chk_option3.Checked)&lt;br /&gt;
            str_opt_selected = str_opt_selected + chk_option3.Text + &amp;quot;\n&amp;quot;;&lt;br /&gt;
        if (chk_option4.Checked)&lt;br /&gt;
            str_opt_selected = str_opt_selected + chk_option4.Text + &amp;quot;\n&amp;quot;;&lt;br /&gt;
        MessageBox.Show(str_opt_selected, &amp;quot;Checked Options&amp;quot;);&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;
==CheckBox.Checked==&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;
    private System.Windows.Forms.GroupBox groupBox1;&lt;br /&gt;
    private System.Windows.Forms.CheckBox checkBox1;&lt;br /&gt;
    private System.Windows.Forms.CheckBox checkBox2;&lt;br /&gt;
    private System.Windows.Forms.CheckBox checkBox3;&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;
    private System.Windows.Forms.Button button1;&lt;br /&gt;
    private System.ruponentModel.Container components = null;&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.checkBox1 = new System.Windows.Forms.CheckBox();&lt;br /&gt;
            this.checkBox2 = new System.Windows.Forms.CheckBox();&lt;br /&gt;
            this.checkBox3 = new System.Windows.Forms.CheckBox();&lt;br /&gt;
            this.radioButton1 = new System.Windows.Forms.RadioButton();&lt;br /&gt;
            this.radioButton2 = new System.Windows.Forms.RadioButton();&lt;br /&gt;
            this.radioButton3 = new System.Windows.Forms.RadioButton();&lt;br /&gt;
            this.button1 = 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.Controls.AddRange(new System.Windows.Forms.Control[] {&lt;br /&gt;
                                                                                    this.radioButton1,&lt;br /&gt;
                                                                                    this.radioButton2,&lt;br /&gt;
                                                                                    this.radioButton3});&lt;br /&gt;
            this.groupBox1.Location = new System.Drawing.Point(8, 120);&lt;br /&gt;
            this.groupBox1.Name = &amp;quot;groupBox1&amp;quot;;&lt;br /&gt;
            this.groupBox1.Size = new System.Drawing.Size(120, 144);&lt;br /&gt;
            this.groupBox1.TabIndex = 0;&lt;br /&gt;
            this.groupBox1.TabStop = false;&lt;br /&gt;
            this.groupBox1.Text = &amp;quot;Color&amp;quot;;&lt;br /&gt;
            this.groupBox1.Enter += new System.EventHandler(this.groupBox1_Enter);&lt;br /&gt;
            // &lt;br /&gt;
            // checkBox1&lt;br /&gt;
            // &lt;br /&gt;
            this.checkBox1.Location = new System.Drawing.Point(8, 8);&lt;br /&gt;
            this.checkBox1.Name = &amp;quot;checkBox1&amp;quot;;&lt;br /&gt;
            this.checkBox1.TabIndex = 1;&lt;br /&gt;
            this.checkBox1.Text = &amp;quot;Circle&amp;quot;;&lt;br /&gt;
            // &lt;br /&gt;
            // checkBox2&lt;br /&gt;
            // &lt;br /&gt;
            this.checkBox2.Location = new System.Drawing.Point(8, 40);&lt;br /&gt;
            this.checkBox2.Name = &amp;quot;checkBox2&amp;quot;;&lt;br /&gt;
            this.checkBox2.TabIndex = 2;&lt;br /&gt;
            this.checkBox2.Text = &amp;quot;Rectangle&amp;quot;;&lt;br /&gt;
            // &lt;br /&gt;
            // checkBox3&lt;br /&gt;
            // &lt;br /&gt;
            this.checkBox3.Location = new System.Drawing.Point(8, 72);&lt;br /&gt;
            this.checkBox3.Name = &amp;quot;checkBox3&amp;quot;;&lt;br /&gt;
            this.checkBox3.TabIndex = 3;&lt;br /&gt;
            this.checkBox3.Text = &amp;quot;String&amp;quot;;&lt;br /&gt;
            // &lt;br /&gt;
            // radioButton1&lt;br /&gt;
            // &lt;br /&gt;
            this.radioButton1.Location = new System.Drawing.Point(8, 32);&lt;br /&gt;
            this.radioButton1.Name = &amp;quot;radioButton1&amp;quot;;&lt;br /&gt;
            this.radioButton1.TabIndex = 4;&lt;br /&gt;
            this.radioButton1.Text = &amp;quot;Red&amp;quot;;&lt;br /&gt;
            this.radioButton1.CheckedChanged += new System.EventHandler(this.radioButton1_CheckedChanged);&lt;br /&gt;
            // &lt;br /&gt;
            // radioButton2&lt;br /&gt;
            // &lt;br /&gt;
            this.radioButton2.Location = new System.Drawing.Point(8, 64);&lt;br /&gt;
            this.radioButton2.Name = &amp;quot;radioButton2&amp;quot;;&lt;br /&gt;
            this.radioButton2.TabIndex = 5;&lt;br /&gt;
            this.radioButton2.Text = &amp;quot;Green&amp;quot;;&lt;br /&gt;
            // &lt;br /&gt;
            // radioButton3&lt;br /&gt;
            // &lt;br /&gt;
            this.radioButton3.Location = new System.Drawing.Point(8, 96);&lt;br /&gt;
            this.radioButton3.Name = &amp;quot;radioButton3&amp;quot;;&lt;br /&gt;
            this.radioButton3.TabIndex = 6;&lt;br /&gt;
            this.radioButton3.Text = &amp;quot;Blue&amp;quot;;&lt;br /&gt;
            // &lt;br /&gt;
            // button1&lt;br /&gt;
            // &lt;br /&gt;
            this.button1.Location = new System.Drawing.Point(8, 280);&lt;br /&gt;
            this.button1.Name = &amp;quot;button1&amp;quot;;&lt;br /&gt;
            this.button1.Size = new System.Drawing.Size(112, 32);&lt;br /&gt;
            this.button1.TabIndex = 4;&lt;br /&gt;
            this.button1.Text = &amp;quot;Draw&amp;quot;;&lt;br /&gt;
            this.button1.Click += new System.EventHandler(this.button1_Click);&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(408, 317);&lt;br /&gt;
            this.Controls.AddRange(new System.Windows.Forms.Control[] {&lt;br /&gt;
                                                                          this.button1,&lt;br /&gt;
                                                                          this.checkBox3,&lt;br /&gt;
                                                                          this.checkBox2,&lt;br /&gt;
                                                                          this.checkBox1,&lt;br /&gt;
                                                                          this.groupBox1});&lt;br /&gt;
            this.Name = &amp;quot;Form1&amp;quot;;&lt;br /&gt;
            this.Text = &amp;quot;CheckBox and RadioButton Sample&amp;quot;;&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;
        {&lt;br /&gt;
            Application.Run(new Form1());&lt;br /&gt;
        }&lt;br /&gt;
        private void groupBox1_Enter(object sender, System.EventArgs e)&lt;br /&gt;
        {&lt;br /&gt;
           Console.WriteLine(&amp;quot;group box enter event&amp;quot;);&lt;br /&gt;
        }&lt;br /&gt;
        private void radioButton1_CheckedChanged(object sender, System.EventArgs e)&lt;br /&gt;
        {&lt;br /&gt;
           Console.WriteLine(&amp;quot;Radio Button checked changed event&amp;quot;);&lt;br /&gt;
        }&lt;br /&gt;
        private void button1_Click(object sender, System.EventArgs e)&lt;br /&gt;
        {&lt;br /&gt;
            Graphics g = Graphics.FromHwnd(this.Handle);&lt;br /&gt;
            String str = &amp;quot;&amp;quot;;&lt;br /&gt;
            Rectangle rc = new Rectangle(150, 50, 250, 250);&lt;br /&gt;
            &lt;br /&gt;
            if(radioButton1.Checked)&lt;br /&gt;
            {&lt;br /&gt;
                str = &amp;quot;red&amp;quot;;&lt;br /&gt;
            }&lt;br /&gt;
            if(radioButton2.Checked)&lt;br /&gt;
            {&lt;br /&gt;
                str+=&amp;quot;Green&amp;quot;;&lt;br /&gt;
            }&lt;br /&gt;
            if(radioButton3.Checked)&lt;br /&gt;
            {&lt;br /&gt;
                str+=&amp;quot;Blue&amp;quot;;&lt;br /&gt;
            }&lt;br /&gt;
            if (checkBox1.Checked)&lt;br /&gt;
            {&lt;br /&gt;
                str+=&amp;quot;Ellipse&amp;quot;;&lt;br /&gt;
            }&lt;br /&gt;
            if (checkBox2.Checked)&lt;br /&gt;
            {&lt;br /&gt;
                str += &amp;quot;Rectangle&amp;quot;;&lt;br /&gt;
            }&lt;br /&gt;
            if (checkBox3.Checked)&lt;br /&gt;
            {&lt;br /&gt;
                g.FillRectangle(new SolidBrush(Color.White), rc);&lt;br /&gt;
                g.DrawString(str, new Font(&amp;quot;Verdana&amp;quot;, 12), new SolidBrush(Color.Black), rc);&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;
==CheckBox.CheckedChanged==&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.Windows.Forms;&lt;br /&gt;
   &lt;br /&gt;
class RadioButtons: Form&lt;br /&gt;
{&lt;br /&gt;
     bool  bFillEllipse;&lt;br /&gt;
     Color colorEllipse;&lt;br /&gt;
   &lt;br /&gt;
     static void Main()&lt;br /&gt;
     {&lt;br /&gt;
          Application.Run(new RadioButtons());&lt;br /&gt;
     }&lt;br /&gt;
     RadioButtons()&lt;br /&gt;
     {&lt;br /&gt;
          ResizeRedraw = true;&lt;br /&gt;
          string[] astrColor = { &amp;quot;Black&amp;quot;, &amp;quot;Blue&amp;quot;, &amp;quot;Green&amp;quot;, &amp;quot;Cyan&amp;quot;};&lt;br /&gt;
   &lt;br /&gt;
          GroupBox grpbox = new GroupBox();&lt;br /&gt;
          grpbox.Parent   = this;&lt;br /&gt;
          grpbox.Text     = &amp;quot;Color&amp;quot;;&lt;br /&gt;
          grpbox.Location = new Point(Font.Height / 2, Font.Height / 2);&lt;br /&gt;
          grpbox.Size     = new Size(9 * Font.Height, (3 * astrColor.Length + 4) * Font.Height / 2);&lt;br /&gt;
   &lt;br /&gt;
          for (int i = 0; i &amp;lt; astrColor.Length; i++)&lt;br /&gt;
          {&lt;br /&gt;
               RadioButton radiobtn = new RadioButton();&lt;br /&gt;
               radiobtn.Parent      = grpbox;&lt;br /&gt;
               radiobtn.Text        = astrColor[i];&lt;br /&gt;
               radiobtn.Location    = new Point(Font.Height,3 * (i + 1) * Font.Height / 2);&lt;br /&gt;
               radiobtn.Size        = new Size(7 * Font.Height,3 * Font.Height / 2);&lt;br /&gt;
               radiobtn.CheckedChanged += new EventHandler(RadioButtonOnCheckedChanged);&lt;br /&gt;
               radiobtn.Checked = true;&lt;br /&gt;
          }&lt;br /&gt;
          CheckBox chkbox = new CheckBox();&lt;br /&gt;
          chkbox.Parent   = this;&lt;br /&gt;
          chkbox.Text     = &amp;quot;Fill Ellipse&amp;quot;;&lt;br /&gt;
          chkbox.Location = new Point(Font.Height, 3 * (astrColor.Length + 2) * Font.Height / 2);&lt;br /&gt;
          chkbox.Size     = new Size(Font.Height * 7, 3 * Font.Height / 2);&lt;br /&gt;
          chkbox.CheckedChanged += new EventHandler(CheckBoxOnCheckedChanged);&lt;br /&gt;
     }&lt;br /&gt;
     void RadioButtonOnCheckedChanged(object obj, EventArgs ea)&lt;br /&gt;
     {&lt;br /&gt;
          RadioButton radiobtn = (RadioButton) obj;&lt;br /&gt;
   &lt;br /&gt;
          if(radiobtn.Checked)&lt;br /&gt;
          {&lt;br /&gt;
               colorEllipse = Color.FromName(radiobtn.Text);&lt;br /&gt;
               Invalidate(false);&lt;br /&gt;
          }&lt;br /&gt;
     }&lt;br /&gt;
     void CheckBoxOnCheckedChanged(object obj, EventArgs ea)&lt;br /&gt;
     {&lt;br /&gt;
          bFillEllipse = ((CheckBox)obj).Checked;&lt;br /&gt;
          Invalidate(false);&lt;br /&gt;
     }&lt;br /&gt;
     protected override void OnPaint(PaintEventArgs pea)&lt;br /&gt;
     {&lt;br /&gt;
          Graphics  grfx = pea.Graphics;&lt;br /&gt;
          Rectangle rect = new Rectangle(10 * Font.Height, 0,&lt;br /&gt;
                                         ClientSize.Width - &lt;br /&gt;
                                             10 * Font.Height - 1,&lt;br /&gt;
                                         ClientSize.Height - 1);&lt;br /&gt;
          if(bFillEllipse)&lt;br /&gt;
               grfx.FillEllipse(new SolidBrush(colorEllipse), rect);&lt;br /&gt;
          else&lt;br /&gt;
               grfx.DrawEllipse(new Pen(colorEllipse), rect);&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;
==CheckBox.ThreeState==&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;
Professional Windows GUI Programming Using C#&lt;br /&gt;
by Jay Glynn, Csaba Torok, Richard Conway, Wahid Choudhury, &lt;br /&gt;
   Zach Greenvoss, Shripad Kulkarni, Neil Whitlow&lt;br /&gt;
Publisher: Peer Information&lt;br /&gt;
ISBN: 1861007663&lt;br /&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;
namespace CheckBox&lt;br /&gt;
{&lt;br /&gt;
  /// &amp;lt;summary&amp;gt;&lt;br /&gt;
  /// Summary description for CheckBoxStyle.&lt;br /&gt;
  /// &amp;lt;/summary&amp;gt;&lt;br /&gt;
  public class CheckBoxStyle : System.Windows.Forms.Form&lt;br /&gt;
  {&lt;br /&gt;
    private System.Windows.Forms.Label label1;&lt;br /&gt;
    private System.Windows.Forms.GroupBox groupBox1;&lt;br /&gt;
    private System.Windows.Forms.CheckBox chk_option1;&lt;br /&gt;
    private System.Windows.Forms.CheckBox chk_option2;&lt;br /&gt;
    private System.Windows.Forms.CheckBox chk_option3;&lt;br /&gt;
    private System.Windows.Forms.CheckBox chk_option4;&lt;br /&gt;
    private System.Windows.Forms.Button button1;&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 CheckBoxStyle()&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.chk_option1 = new System.Windows.Forms.CheckBox();&lt;br /&gt;
      this.label1 = new System.Windows.Forms.Label();&lt;br /&gt;
      this.chk_option2 = new System.Windows.Forms.CheckBox();&lt;br /&gt;
      this.chk_option3 = new System.Windows.Forms.CheckBox();&lt;br /&gt;
      this.chk_option4 = new System.Windows.Forms.CheckBox();&lt;br /&gt;
      this.groupBox1 = new System.Windows.Forms.GroupBox();&lt;br /&gt;
      this.button1 = new System.Windows.Forms.Button();&lt;br /&gt;
      this.groupBox1.SuspendLayout();&lt;br /&gt;
      this.SuspendLayout();&lt;br /&gt;
      // &lt;br /&gt;
      // chk_option1&lt;br /&gt;
      // &lt;br /&gt;
      this.chk_option1.CheckAlign = System.Drawing.ContentAlignment.MiddleRight;&lt;br /&gt;
      this.chk_option1.Location = new System.Drawing.Point(40, 24);&lt;br /&gt;
      this.chk_option1.Name = &amp;quot;chk_option1&amp;quot;;&lt;br /&gt;
      this.chk_option1.Size = new System.Drawing.Size(192, 24);&lt;br /&gt;
      this.chk_option1.TabIndex = 0;&lt;br /&gt;
      this.chk_option1.Text = &amp;quot;Windows 2000 / Windows XP&amp;quot;;&lt;br /&gt;
      this.chk_option1.ThreeState = true;&lt;br /&gt;
      // &lt;br /&gt;
      // label1&lt;br /&gt;
      // &lt;br /&gt;
      this.label1.Location = new System.Drawing.Point(16, 24);&lt;br /&gt;
      this.label1.Name = &amp;quot;label1&amp;quot;;&lt;br /&gt;
      this.label1.Size = new System.Drawing.Size(296, 16);&lt;br /&gt;
      this.label1.TabIndex = 1;&lt;br /&gt;
      this.label1.Text = &amp;quot;The following products are developed by Microsoft Corp.&amp;quot;;&lt;br /&gt;
      // &lt;br /&gt;
      // chk_option2&lt;br /&gt;
      // &lt;br /&gt;
      this.chk_option2.Location = new System.Drawing.Point(40, 56);&lt;br /&gt;
      this.chk_option2.Name = &amp;quot;chk_option2&amp;quot;;&lt;br /&gt;
      this.chk_option2.Size = new System.Drawing.Size(192, 24);&lt;br /&gt;
      this.chk_option2.TabIndex = 0;&lt;br /&gt;
      this.chk_option2.Text = &amp;quot;JAVA&amp;quot;;&lt;br /&gt;
      // &lt;br /&gt;
      // chk_option3&lt;br /&gt;
      // &lt;br /&gt;
      this.chk_option3.Appearance = System.Windows.Forms.Appearance.Button;&lt;br /&gt;
      this.chk_option3.ImageAlign = System.Drawing.ContentAlignment.MiddleRight;&lt;br /&gt;
      this.chk_option3.Location = new System.Drawing.Point(40, 88);&lt;br /&gt;
      this.chk_option3.Name = &amp;quot;chk_option3&amp;quot;;&lt;br /&gt;
      this.chk_option3.Size = new System.Drawing.Size(192, 24);&lt;br /&gt;
      this.chk_option3.TabIndex = 0;&lt;br /&gt;
      this.chk_option3.Text = &amp;quot;Visual C# and .NET&amp;quot;;&lt;br /&gt;
      // &lt;br /&gt;
      // chk_option4&lt;br /&gt;
      // &lt;br /&gt;
      this.chk_option4.Appearance = System.Windows.Forms.Appearance.Button;&lt;br /&gt;
      this.chk_option4.FlatStyle = System.Windows.Forms.FlatStyle.Flat;&lt;br /&gt;
      this.chk_option4.Location = new System.Drawing.Point(40, 120);&lt;br /&gt;
      this.chk_option4.Name = &amp;quot;chk_option4&amp;quot;;&lt;br /&gt;
      this.chk_option4.Size = new System.Drawing.Size(192, 24);&lt;br /&gt;
      this.chk_option4.TabIndex = 0;&lt;br /&gt;
      this.chk_option4.Text = &amp;quot;Oracle Database&amp;quot;;&lt;br /&gt;
      // &lt;br /&gt;
      // groupBox1&lt;br /&gt;
      // &lt;br /&gt;
      this.groupBox1.Controls.AddRange(new System.Windows.Forms.Control[] {&lt;br /&gt;
                                          this.chk_option2,&lt;br /&gt;
                                          this.chk_option4,&lt;br /&gt;
                                          this.chk_option3,&lt;br /&gt;
                                          this.chk_option1});&lt;br /&gt;
      this.groupBox1.Location = new System.Drawing.Point(16, 56);&lt;br /&gt;
      this.groupBox1.Name = &amp;quot;groupBox1&amp;quot;;&lt;br /&gt;
      this.groupBox1.Size = new System.Drawing.Size(280, 152);&lt;br /&gt;
      this.groupBox1.TabIndex = 2;&lt;br /&gt;
      this.groupBox1.TabStop = false;&lt;br /&gt;
      this.groupBox1.Text = &amp;quot;Select All Correct Options&amp;quot;;&lt;br /&gt;
      // &lt;br /&gt;
      // button1&lt;br /&gt;
      // &lt;br /&gt;
      this.button1.Location = new System.Drawing.Point(16, 216);&lt;br /&gt;
      this.button1.Name = &amp;quot;button1&amp;quot;;&lt;br /&gt;
      this.button1.TabIndex = 3;&lt;br /&gt;
      this.button1.Text = &amp;quot;Done &amp;quot;;&lt;br /&gt;
      this.button1.Click += new System.EventHandler(this.button1_Click);&lt;br /&gt;
      // &lt;br /&gt;
      // CheckBoxStyle&lt;br /&gt;
      // &lt;br /&gt;
      this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);&lt;br /&gt;
      this.ClientSize = new System.Drawing.Size(328, 253);&lt;br /&gt;
      this.Controls.AddRange(new System.Windows.Forms.Control[] {&lt;br /&gt;
                                      this.button1,&lt;br /&gt;
                                      this.groupBox1,&lt;br /&gt;
                                      this.label1});&lt;br /&gt;
      this.Name = &amp;quot;CheckBoxStyle&amp;quot;;&lt;br /&gt;
      this.Text = &amp;quot;Check Boxes&amp;quot;;&lt;br /&gt;
      this.Load += new System.EventHandler(this.CheckBoxStyle_Load);&lt;br /&gt;
      this.groupBox1.ResumeLayout(false);&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 CheckBoxStyle());&lt;br /&gt;
    }&lt;br /&gt;
    private void CheckBoxStyle_Load(object sender, System.EventArgs e)&lt;br /&gt;
    {&lt;br /&gt;
      // Load the Image that we want to display on the button&lt;br /&gt;
      Image imga = Image.FromFile(&amp;quot;WRENCH.ICO&amp;quot;);&lt;br /&gt;
      // Assign the Image for the checkbox&lt;br /&gt;
      chk_option3.Image = imga;&lt;br /&gt;
      // Align the image on the face of the checkbox&lt;br /&gt;
      chk_option3.ImageAlign = ContentAlignment.MiddleRight;&lt;br /&gt;
      // Select the background color for the checkbox&lt;br /&gt;
      chk_option3.BackColor = Color.LightBlue ;&lt;br /&gt;
      // Load the Image that we want to display on the button&lt;br /&gt;
      imga = Image.FromFile(&amp;quot;EYE.ICO&amp;quot;);&lt;br /&gt;
      // Assign the Image for the checkbox&lt;br /&gt;
      chk_option4.Image = imga;&lt;br /&gt;
      // Align the image on the face of the checkbox&lt;br /&gt;
      chk_option4.ImageAlign = ContentAlignment.MiddleCenter;&lt;br /&gt;
      // Select the background color for the checkbox&lt;br /&gt;
      chk_option4.BackColor = Color.LightBlue ;&lt;br /&gt;
    }&lt;br /&gt;
    private void button1_Click(object sender, System.EventArgs e)&lt;br /&gt;
    {&lt;br /&gt;
      string str_opt_selected = &amp;quot;Options Selected are ..\n&amp;quot; ;&lt;br /&gt;
  &lt;br /&gt;
      // Check which options are selected for every checkbox&lt;br /&gt;
      // using the Checked property&lt;br /&gt;
      if ( chk_option1.Checked ) &lt;br /&gt;
        str_opt_selected = str_opt_selected + chk_option1.Text + &amp;quot;\n&amp;quot;;&lt;br /&gt;
      if ( chk_option2.Checked ) &lt;br /&gt;
        str_opt_selected = str_opt_selected + chk_option2.Text + &amp;quot;\n&amp;quot;;&lt;br /&gt;
      if ( chk_option3.Checked ) &lt;br /&gt;
        str_opt_selected = str_opt_selected + chk_option3.Text + &amp;quot;\n&amp;quot;;&lt;br /&gt;
      if ( chk_option4.Checked ) &lt;br /&gt;
        str_opt_selected = str_opt_selected + chk_option4.Text + &amp;quot;\n&amp;quot;;&lt;br /&gt;
      MessageBox.Show(str_opt_selected , &amp;quot;Checked Options&amp;quot;);&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;
==extends CheckBox==&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.Windows.Forms;&lt;br /&gt;
   &lt;br /&gt;
class CustomCheckBox: Form&lt;br /&gt;
{&lt;br /&gt;
     public static void Main()&lt;br /&gt;
     {&lt;br /&gt;
          Application.Run(new CustomCheckBox());&lt;br /&gt;
     }&lt;br /&gt;
     public CustomCheckBox()&lt;br /&gt;
     {&lt;br /&gt;
          int      cyText = Font.Height;&lt;br /&gt;
          int      cxText = cyText / 2;&lt;br /&gt;
          FontStyle[] afs = { FontStyle.Bold,      FontStyle.Italic, &lt;br /&gt;
                              FontStyle.Underline, FontStyle.Strikeout };&lt;br /&gt;
   &lt;br /&gt;
          Label label    = new Label();&lt;br /&gt;
          label.Parent   = this;&lt;br /&gt;
          label.Text     = &amp;quot;Sample Text&amp;quot;;&lt;br /&gt;
          label.AutoSize = true;&lt;br /&gt;
   &lt;br /&gt;
          for (int i = 0; i &amp;lt; 4; i++)&lt;br /&gt;
          {&lt;br /&gt;
               FontStyleCheckBox chkbox = new FontStyleCheckBox();&lt;br /&gt;
               chkbox.Parent = this;&lt;br /&gt;
               chkbox.Text = afs[i].ToString();&lt;br /&gt;
               chkbox.fontstyle = afs[i];&lt;br /&gt;
               chkbox.Location = new Point(2 * cxText, &lt;br /&gt;
                                               (4 + 3 * i) * cyText / 2);&lt;br /&gt;
               chkbox.Size = new Size(12 * cxText, cyText);&lt;br /&gt;
               chkbox.CheckedChanged += new EventHandler(CheckBoxOnCheckedChanged);&lt;br /&gt;
          }&lt;br /&gt;
     }&lt;br /&gt;
     void CheckBoxOnCheckedChanged(object obj, EventArgs ea)&lt;br /&gt;
     {&lt;br /&gt;
          FontStyle fs = 0;&lt;br /&gt;
          Label     label = null;&lt;br /&gt;
   &lt;br /&gt;
          for (int i = 0; i &amp;lt; Controls.Count; i++)&lt;br /&gt;
          {&lt;br /&gt;
               Control ctrl = Controls[i];&lt;br /&gt;
   &lt;br /&gt;
               if (ctrl.GetType() == typeof(Label))&lt;br /&gt;
                    label = (Label) ctrl;&lt;br /&gt;
               else if (ctrl.GetType() == typeof(FontStyleCheckBox))&lt;br /&gt;
                    if (((FontStyleCheckBox) ctrl).Checked)&lt;br /&gt;
                         fs |= ((FontStyleCheckBox) ctrl).fontstyle;&lt;br /&gt;
          }&lt;br /&gt;
          label.Font = new Font(label.Font, fs);&lt;br /&gt;
     }&lt;br /&gt;
}&lt;br /&gt;
class FontStyleCheckBox: CheckBox&lt;br /&gt;
{&lt;br /&gt;
     public FontStyle fontstyle;&lt;br /&gt;
}&lt;br /&gt;
   &lt;br /&gt;
  &amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==new CheckBox()==&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.Windows.Forms;&lt;br /&gt;
   &lt;br /&gt;
class CheckBoxWithLabel: Form&lt;br /&gt;
{&lt;br /&gt;
     Label label;&lt;br /&gt;
     FontStyle   fs   = 0;&lt;br /&gt;
     FontStyle[] afs  = { FontStyle.Bold,FontStyle.Italic, FontStyle.Underline, FontStyle.Strikeout };&lt;br /&gt;
   &lt;br /&gt;
     public static void Main()&lt;br /&gt;
     {&lt;br /&gt;
          Application.Run(new CheckBoxWithLabel());&lt;br /&gt;
     }&lt;br /&gt;
     public CheckBoxWithLabel()&lt;br /&gt;
     {&lt;br /&gt;
          int      cyText   = Font.Height;&lt;br /&gt;
          int      cxText   = cyText / 2;&lt;br /&gt;
          string[] astrText = {&amp;quot;Bold&amp;quot;, &amp;quot;Italic&amp;quot;, &amp;quot;Underline&amp;quot;, &amp;quot;Strikeout&amp;quot;};&lt;br /&gt;
   &lt;br /&gt;
          label = new Label();&lt;br /&gt;
          label.Parent   = this;&lt;br /&gt;
          label.Text     = &amp;quot;Sample Text&amp;quot;;&lt;br /&gt;
          label.AutoSize = true;&lt;br /&gt;
   &lt;br /&gt;
          for (int i = 0; i &amp;lt; 4; i++)&lt;br /&gt;
          {&lt;br /&gt;
               CheckBox chkbox = new CheckBox();&lt;br /&gt;
               chkbox.Parent = this;&lt;br /&gt;
               chkbox.Text = astrText[i];&lt;br /&gt;
               chkbox.Location = new Point(2 * cxText, (4 + 3 * i) * cyText / 2);&lt;br /&gt;
               chkbox.Size = new Size(12 * cxText, cyText);&lt;br /&gt;
               chkbox.CheckedChanged += new EventHandler(CheckBoxOnCheckedChanged);&lt;br /&gt;
          }&lt;br /&gt;
     }&lt;br /&gt;
     void CheckBoxOnCheckedChanged(object obj, EventArgs ea)&lt;br /&gt;
     {&lt;br /&gt;
          for (int i = 0; i &amp;lt; 4; i++)&lt;br /&gt;
               if (((CheckBox) Controls[i + 1]).Checked)&lt;br /&gt;
                    fs |= afs[i];&lt;br /&gt;
   &lt;br /&gt;
          label.Font = new Font(label.Font, fs);&lt;br /&gt;
     }&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>