<?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%2FControl</id>
		<title>Csharp/C Sharp by API/System.Windows.Forms/Control - История изменений</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%2FControl"/>
		<link rel="alternate" type="text/html" href="http://nfex.ru/index.php?title=Csharp/C_Sharp_by_API/System.Windows.Forms/Control&amp;action=history"/>
		<updated>2026-04-30T13:57:02Z</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/Control&amp;diff=4154&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/Control&amp;diff=4154&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/Control&amp;diff=4155&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/Control&amp;diff=4155&amp;oldid=prev"/>
				<updated>2010-05-26T12:09:38Z</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;==Control.GetType==&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;
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;
   &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;
==Control.HasChildren==&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;
public class ControlParent : Form&lt;br /&gt;
{&lt;br /&gt;
  private Button btn;&lt;br /&gt;
  public ControlParent()&lt;br /&gt;
  {&lt;br /&gt;
    btn = new Button();&lt;br /&gt;
    btn.Location = new Point(50,50);&lt;br /&gt;
    btn.Size = new Size(100,23);&lt;br /&gt;
    btn.Text = &amp;quot;Relationships&amp;quot;;&lt;br /&gt;
        //Controls.Add(btn);&lt;br /&gt;
    btn.Parent = this;&lt;br /&gt;
    MessageBox.Show(&amp;quot;Button Parent:  &amp;quot; + btn.Parent.ToString() + &amp;quot;\n&amp;quot; +&lt;br /&gt;
      &amp;quot;Button HasChildren:  &amp;quot; + btn.HasChildren.ToString() + &amp;quot;\n&amp;quot; + &lt;br /&gt;
      &amp;quot;TopLevelControl:  &amp;quot; + btn.TopLevelControl.ToString() + &amp;quot;\n&amp;quot; + &lt;br /&gt;
      &amp;quot;Form HasChildren:  &amp;quot; + this.HasChildren.ToString() + &amp;quot;\n&amp;quot; + &lt;br /&gt;
      &amp;quot;Form Controls Count:  &amp;quot; + this.Controls.Count.ToString(),&lt;br /&gt;
      &amp;quot;Button Relationships&amp;quot;);&lt;br /&gt;
  }&lt;br /&gt;
  static void Main() &lt;br /&gt;
  {&lt;br /&gt;
    Application.Run(new ControlParent());&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;
==Control.Name==&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;
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;
   Label Label1;&lt;br /&gt;
   TextBox TextBox1;&lt;br /&gt;
   Button Button1;&lt;br /&gt;
  public Form1()&lt;br /&gt;
  {&lt;br /&gt;
        InitializeComponent();&lt;br /&gt;
  }&lt;br /&gt;
   private void ctrlClick(System.Object sender, EventArgs e)&lt;br /&gt;
   {&lt;br /&gt;
     Control ctrl = (Control)sender;&lt;br /&gt;
     MessageBox.Show(&amp;quot;You clicked: &amp;quot; + ctrl.Name);&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.TextBox1 = new System.Windows.Forms.TextBox();&lt;br /&gt;
    this.Button1 = 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.FlatStyle = System.Windows.Forms.FlatStyle.System;&lt;br /&gt;
    this.Label1.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.Label1.Location = new System.Drawing.Point(14, 97);&lt;br /&gt;
    this.Label1.Name = &amp;quot;Label1&amp;quot;;&lt;br /&gt;
    this.Label1.Size = new System.Drawing.Size(112, 24);&lt;br /&gt;
    this.Label1.TabIndex = 8;&lt;br /&gt;
    this.Label1.Text = &amp;quot;Label1&amp;quot;;&lt;br /&gt;
    this.Label1.Click += new System.EventHandler(this.ctrlClick);&lt;br /&gt;
    // &lt;br /&gt;
    // TextBox1&lt;br /&gt;
    // &lt;br /&gt;
    this.TextBox1.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.TextBox1.Location = new System.Drawing.Point(12, 61);&lt;br /&gt;
    this.TextBox1.Name = &amp;quot;TextBox1&amp;quot;;&lt;br /&gt;
    this.TextBox1.Size = new System.Drawing.Size(156, 21);&lt;br /&gt;
    this.TextBox1.TabIndex = 7;&lt;br /&gt;
    this.TextBox1.Text = &amp;quot;TextBox1&amp;quot;;&lt;br /&gt;
    this.TextBox1.Click += new System.EventHandler(this.ctrlClick);&lt;br /&gt;
    // &lt;br /&gt;
    // Button1&lt;br /&gt;
    // &lt;br /&gt;
    this.Button1.FlatStyle = System.Windows.Forms.FlatStyle.System;&lt;br /&gt;
    this.Button1.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.Button1.Location = new System.Drawing.Point(12, 21);&lt;br /&gt;
    this.Button1.Name = &amp;quot;Button1&amp;quot;;&lt;br /&gt;
    this.Button1.Size = new System.Drawing.Size(96, 28);&lt;br /&gt;
    this.Button1.TabIndex = 6;&lt;br /&gt;
    this.Button1.Text = &amp;quot;Button1&amp;quot;;&lt;br /&gt;
    this.Button1.Click += new System.EventHandler(this.ctrlClick);&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(367, 281);&lt;br /&gt;
    this.Controls.Add(this.Label1);&lt;br /&gt;
    this.Controls.Add(this.TextBox1);&lt;br /&gt;
    this.Controls.Add(this.Button1);&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;Control Medley&amp;quot;;&lt;br /&gt;
    this.ResumeLayout(false);&lt;br /&gt;
    this.PerformLayout();&lt;br /&gt;
  }&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;
   &lt;br /&gt;
    &lt;br /&gt;
  &amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Control.Parent==&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;
public class ControlParent : Form&lt;br /&gt;
{&lt;br /&gt;
  private Button btn;&lt;br /&gt;
  public ControlParent()&lt;br /&gt;
  {&lt;br /&gt;
    btn = new Button();&lt;br /&gt;
    btn.Location = new Point(50,50);&lt;br /&gt;
    btn.Size = new Size(100,23);&lt;br /&gt;
    btn.Text = &amp;quot;Relationships&amp;quot;;&lt;br /&gt;
        //Controls.Add(btn);&lt;br /&gt;
    btn.Parent = this;&lt;br /&gt;
    MessageBox.Show(&amp;quot;Button Parent:  &amp;quot; + btn.Parent.ToString() + &amp;quot;\n&amp;quot; +&lt;br /&gt;
      &amp;quot;Button HasChildren:  &amp;quot; + btn.HasChildren.ToString() + &amp;quot;\n&amp;quot; + &lt;br /&gt;
      &amp;quot;TopLevelControl:  &amp;quot; + btn.TopLevelControl.ToString() + &amp;quot;\n&amp;quot; + &lt;br /&gt;
      &amp;quot;Form HasChildren:  &amp;quot; + this.HasChildren.ToString() + &amp;quot;\n&amp;quot; + &lt;br /&gt;
      &amp;quot;Form Controls Count:  &amp;quot; + this.Controls.Count.ToString(),&lt;br /&gt;
      &amp;quot;Button Relationships&amp;quot;);&lt;br /&gt;
  }&lt;br /&gt;
  static void Main() &lt;br /&gt;
  {&lt;br /&gt;
    Application.Run(new ControlParent());&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;
==Control.TopLevelControl==&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;
public class ControlParent : Form&lt;br /&gt;
{&lt;br /&gt;
  private Button btn;&lt;br /&gt;
  public ControlParent()&lt;br /&gt;
  {&lt;br /&gt;
    btn = new Button();&lt;br /&gt;
    btn.Location = new Point(50,50);&lt;br /&gt;
    btn.Size = new Size(100,23);&lt;br /&gt;
    btn.Text = &amp;quot;Relationships&amp;quot;;&lt;br /&gt;
        //Controls.Add(btn);&lt;br /&gt;
    btn.Parent = this;&lt;br /&gt;
    MessageBox.Show(&amp;quot;Button Parent:  &amp;quot; + btn.Parent.ToString() + &amp;quot;\n&amp;quot; +&lt;br /&gt;
      &amp;quot;Button HasChildren:  &amp;quot; + btn.HasChildren.ToString() + &amp;quot;\n&amp;quot; + &lt;br /&gt;
      &amp;quot;TopLevelControl:  &amp;quot; + btn.TopLevelControl.ToString() + &amp;quot;\n&amp;quot; + &lt;br /&gt;
      &amp;quot;Form HasChildren:  &amp;quot; + this.HasChildren.ToString() + &amp;quot;\n&amp;quot; + &lt;br /&gt;
      &amp;quot;Form Controls Count:  &amp;quot; + this.Controls.Count.ToString(),&lt;br /&gt;
      &amp;quot;Button Relationships&amp;quot;);&lt;br /&gt;
  }&lt;br /&gt;
  static void Main() &lt;br /&gt;
  {&lt;br /&gt;
    Application.Run(new ControlParent());&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>