<?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.Drawing%2FColor</id>
		<title>Csharp/C Sharp by API/System.Drawing/Color - История изменений</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.Drawing%2FColor"/>
		<link rel="alternate" type="text/html" href="http://nfex.ru/index.php?title=Csharp/C_Sharp_by_API/System.Drawing/Color&amp;action=history"/>
		<updated>2026-04-29T20:41:51Z</updated>
		<subtitle>История изменений этой страницы в вики</subtitle>
		<generator>MediaWiki 1.30.0</generator>

	<entry>
		<id>http://nfex.ru/index.php?title=Csharp/C_Sharp_by_API/System.Drawing/Color&amp;diff=4635&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.Drawing/Color&amp;diff=4635&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.Drawing/Color&amp;diff=4636&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.Drawing/Color&amp;diff=4636&amp;oldid=prev"/>
				<updated>2010-05-26T12:11:28Z</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.AliceBlue==&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;
//ColorGuide.cs&lt;br /&gt;
/*&lt;br /&gt;
   This Program will generate all the colors that are supported in C# according &lt;br /&gt;
   to the Name....&lt;br /&gt;
   I expected from you a better version of this program&lt;br /&gt;
     If you can , then inform me how you made it&lt;br /&gt;
   e.g. you make a dll file where the whole color array is stored then &lt;br /&gt;
   your coding lines will  decrease. I tried that way but the trial was &lt;br /&gt;
   in vane....&lt;br /&gt;
*/&lt;br /&gt;
using System;&lt;br /&gt;
using System.Windows.Forms;&lt;br /&gt;
using System.Drawing;&lt;br /&gt;
public class CreateMyPanel : Form&lt;br /&gt;
{  &lt;br /&gt;
  Color[] color = new Color[]{&lt;br /&gt;
                   Color.AliceBlue,    Color.AntiqueWhite,   Color.Aqua,   Color.Aquamarine,&lt;br /&gt;
                   Color.Azure,        Color.Beige,          Color.Bisque, Color.Black,&lt;br /&gt;
                   Color.BlanchedAlmond,Color.Blue,          Color.BlueViolet,Color.Brown,&lt;br /&gt;
                   Color.BurlyWood,    Color.CadetBlue,      Color.Chartreuse,Color.Chocolate,&lt;br /&gt;
                   Color.Coral,        Color.Cornsilk,Color.Crimson,&lt;br /&gt;
                   Color.Cyan,         Color.DarkBlue,       Color.DarkCyan,Color.DarkGoldenrod,&lt;br /&gt;
                   Color.DarkGray,     Color.DarkGreen,      Color.DarkKhaki,Color.DarkMagenta,&lt;br /&gt;
                   Color.DarkOliveGreen,Color.DarkOrange,Color.DarkOrchid,Color.DarkRed,&lt;br /&gt;
                   Color.DarkSalmon,Color.DarkSeaGreen,Color.DarkSlateBlue,Color.DarkSlateGray,&lt;br /&gt;
                   Color.DarkTurquoise,Color.DarkViolet,Color.DeepPink,Color.DeepSkyBlue,&lt;br /&gt;
                   Color.DimGray,Color.DodgerBlue,Color.Firebrick,Color.FloralWhite,&lt;br /&gt;
                   Color.ForestGreen,Color.Fuchsia,Color.Gainsboro,Color.GhostWhite,&lt;br /&gt;
                   Color.Gold,Color.Goldenrod,Color.Gray,Color.Green,Color.GreenYellow,&lt;br /&gt;
                   Color.Honeydew,Color.HotPink,Color.IndianRed,Color.Indigo,&lt;br /&gt;
                   Color.Ivory,Color.Khaki,Color.Lavender,Color.LavenderBlush,&lt;br /&gt;
                   Color.LawnGreen,Color.LemonChiffon,Color.LightBlue,Color.LightCoral,&lt;br /&gt;
                   Color.LightCyan,Color.LightGoldenrodYellow,Color.LightGray,&lt;br /&gt;
                   Color.LightGreen,Color.LightPink,Color.LightSalmon,Color.LightSeaGreen,&lt;br /&gt;
                   Color.LightSkyBlue,Color.LightSlateGray,Color.LightSteelBlue,&lt;br /&gt;
                   Color.LightYellow,Color.Lime,Color.LimeGreen,Color.Linen,&lt;br /&gt;
                   Color.Magenta,Color.Maroon,Color.MediumAquamarine,Color.MediumBlue,&lt;br /&gt;
                   Color.MediumOrchid,Color.MediumPurple,Color.MediumSeaGreen,&lt;br /&gt;
                   Color.MediumSlateBlue,Color.MediumSpringGreen,Color.MediumTurquoise,&lt;br /&gt;
                   Color.MediumVioletRed,Color.MidnightBlue,Color.MintCream,Color.MistyRose,&lt;br /&gt;
                   Color.Moccasin,Color.NavajoWhite,Color.Navy,Color.OldLace,&lt;br /&gt;
                   Color.Olive,Color.OliveDrab,Color.Orange,Color.OrangeRed,&lt;br /&gt;
                   Color.Orchid,Color.PaleGoldenrod,Color.PaleGreen,Color.PaleTurquoise,&lt;br /&gt;
                   Color.PaleVioletRed,Color.PapayaWhip,Color.PeachPuff,Color.Peru,&lt;br /&gt;
                   Color.Pink,Color.Plum,Color.PowderBlue,Color.Purple,Color.Red,&lt;br /&gt;
                   Color.RosyBrown,Color.RoyalBlue,Color.SaddleBrown,Color.Salmon,&lt;br /&gt;
                   Color.SandyBrown,Color.SeaGreen,Color.SeaShell,Color.Sienna,Color.Silver,&lt;br /&gt;
                   Color.SkyBlue,Color.SlateBlue,Color.SlateGray,Color.Snow,&lt;br /&gt;
                   Color.SpringGreen,Color.SteelBlue,Color.Tan,Color.Teal,&lt;br /&gt;
                   Color.Thistle,Color.Tomato,Color.Transparent,Color.Turquoise,&lt;br /&gt;
                   Color.Violet,Color.Wheat,Color.White,Color.WhiteSmoke,Color.Yellow,&lt;br /&gt;
                   Color.YellowGreen&lt;br /&gt;
                 };&lt;br /&gt;
  private Panel panel1 = new Panel(); &lt;br /&gt;
  private Label[] col = new Label[140];&lt;br /&gt;
  public CreateMyPanel() &lt;br /&gt;
  {     &lt;br /&gt;
    // Initialize the Panel control.&lt;br /&gt;
    panel1.Location = new Point(ClientRectangle.Left + 5,ClientRectangle.Top + 5);&lt;br /&gt;
    panel1.Size = new Size(ClientRectangle.Right-5, ClientRectangle.Bottom-5);  &lt;br /&gt;
    panel1.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;&lt;br /&gt;
    this.Controls.Add(panel1); // Add the Panel control to (inside) the form.  &lt;br /&gt;
    // Initalize the Label controls.  &lt;br /&gt;
    int ystart = ClientRectangle.Top;&lt;br /&gt;
    for(int j=0; j&amp;lt;140; j++)&lt;br /&gt;
      col[j] = new Label();&lt;br /&gt;
    for(int i = 0; i&amp;lt;140; i++)&lt;br /&gt;
    {&lt;br /&gt;
      col[i].Size = new Size(ClientRectangle.Right, 20);  &lt;br /&gt;
      col[i].Font = new System.Drawing.Font(&amp;quot;Comic Sans MS&amp;quot;,10,FontStyle.Bold);  &lt;br /&gt;
      col[i].ForeColor = Color.Black;&lt;br /&gt;
      if(col[i].Equals(Color.Black) == true)&lt;br /&gt;
      {&lt;br /&gt;
          col[i].ForeColor = Color.White;&lt;br /&gt;
      }&lt;br /&gt;
      col[i].Text = color[i].ToString();&lt;br /&gt;
      col[i].Location = new Point(ClientRectangle.Left,ystart);&lt;br /&gt;
      col[i].BackColor = color[i];&lt;br /&gt;
      col[i].BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;  &lt;br /&gt;
      panel1.Controls.Add(col[i]);  // Add the Label controls to (inside) the Panel.&lt;br /&gt;
      if((col[i].Location.Y &amp;gt; panel1.Location.Y))&lt;br /&gt;
      {&lt;br /&gt;
        panel1.AutoScroll = true;   &lt;br /&gt;
      }  &lt;br /&gt;
      ystart += 20;&lt;br /&gt;
    }&lt;br /&gt;
    this.Size = new Size(315, 300);&lt;br /&gt;
    this.Text = &amp;quot;A Color Guide - JAYANT&amp;quot;;&lt;br /&gt;
    this.MaximizeBox = false;&lt;br /&gt;
//    this.BorderStyle = FormBorderStyle.FixedDialog;&lt;br /&gt;
    this.StartPosition = FormStartPosition.CenterScreen;&lt;br /&gt;
  }&lt;br /&gt;
  public static void Main() &lt;br /&gt;
  {&lt;br /&gt;
    Application.Run(new CreateMyPanel());&lt;br /&gt;
  }&lt;br /&gt;
}  &lt;br /&gt;
/* To Compile :----&lt;br /&gt;
csc /r:System.dll /r:System.Drawing.dll /r:System.Windows.Forms.dll /r:Microssft.Win32.InterOp.dll /out:ColorGuide.exe Colorguide.cs&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;
==Color.Chocolate==&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 PaintEvent&lt;br /&gt;
{&lt;br /&gt;
     public static void Main()&lt;br /&gt;
     {&lt;br /&gt;
          Form form   = new Form();&lt;br /&gt;
          form.Text   = &amp;quot;Paint Event&amp;quot;;&lt;br /&gt;
          form.Paint += new PaintEventHandler(MyPaintHandler);&lt;br /&gt;
   &lt;br /&gt;
          Application.Run(form);&lt;br /&gt;
     }&lt;br /&gt;
     static void MyPaintHandler(object objSender, PaintEventArgs pea)&lt;br /&gt;
     {&lt;br /&gt;
          Graphics graphics = pea.Graphics;&lt;br /&gt;
   &lt;br /&gt;
          graphics.Clear(Color.Chocolate);&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;
==Color.FromArgb(olor.Blue)==&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.Drawing.Drawing2D;&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;
  {&lt;br /&gt;
    public Form1()&lt;br /&gt;
    {&lt;br /&gt;
      InitializeComponent();&lt;br /&gt;
    }&lt;br /&gt;
    private void InitializeComponent()&lt;br /&gt;
    {&lt;br /&gt;
      this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);&lt;br /&gt;
      this.ClientSize = new System.Drawing.Size(292, 273);&lt;br /&gt;
      this.Text = &amp;quot;&amp;quot;;&lt;br /&gt;
      this.Resize += new System.EventHandler(this.Form1_Resize);&lt;br /&gt;
      this.Paint += new System.Windows.Forms.PaintEventHandler(this.Form1_Paint);&lt;br /&gt;
    }&lt;br /&gt;
    static void Main() &lt;br /&gt;
    {&lt;br /&gt;
      Application.Run(new Form1());&lt;br /&gt;
    }&lt;br /&gt;
    private void Form1_Paint(object sender, System.Windows.Forms.PaintEventArgs e)&lt;br /&gt;
    {&lt;br /&gt;
      Graphics g = e.Graphics;&lt;br /&gt;
      g.FillRectangle(Brushes.White, this.ClientRectangle);&lt;br /&gt;
      Color c1 = Color.FromArgb(100, Color.Blue);&lt;br /&gt;
      Color c2 = Color.FromArgb(50, Color.Green);&lt;br /&gt;
      g.FillEllipse(Brushes.Red, 20, 20, 80, 80);&lt;br /&gt;
      g.FillRectangle(new SolidBrush(c1), 60, 80, 60, 60);&lt;br /&gt;
      Point[] pa = new Point[] {&lt;br /&gt;
                        new Point(150, 40), &lt;br /&gt;
                        new Point(90, 40), &lt;br /&gt;
                        new Point(90, 120)};&lt;br /&gt;
      g.FillPolygon(new SolidBrush(c2), pa);&lt;br /&gt;
    }&lt;br /&gt;
    private void Form1_Resize(object sender, System.EventArgs e)&lt;br /&gt;
    {&lt;br /&gt;
      Invalidate();&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;
==Color.FromArgb(77, color.R, color.G, color.B)==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
&amp;lt;source lang=&amp;quot;csharp&amp;quot;&amp;gt;  &lt;br /&gt;
using System;&lt;br /&gt;
using System.Collections.Generic;&lt;br /&gt;
using System.ruponentModel;&lt;br /&gt;
using System.Data;&lt;br /&gt;
using System.Drawing;&lt;br /&gt;
using System.Text;&lt;br /&gt;
using System.Windows.Forms;&lt;br /&gt;
public class Form1 : Form&lt;br /&gt;
{&lt;br /&gt;
  public Form1() {&lt;br /&gt;
        InitializeComponent();&lt;br /&gt;
  }&lt;br /&gt;
  private void Form1_Paint(object sender, PaintEventArgs e)&lt;br /&gt;
  {&lt;br /&gt;
    Bitmap bitmap = new Bitmap(&amp;quot;winter.jpg&amp;quot;);&lt;br /&gt;
    TextureBrush brush = new TextureBrush(bitmap);&lt;br /&gt;
    e.Graphics.FillRectangle(brush, ClientRectangle);&lt;br /&gt;
        bitmap.Dispose();&lt;br /&gt;
    Color color = Color.Yellow;&lt;br /&gt;
    int penWidth = 80;&lt;br /&gt;
    Pen opaquePen = new Pen(color, penWidth);&lt;br /&gt;
    e.Graphics.DrawLine(opaquePen, 0, 50, 200, 20);&lt;br /&gt;
        opaquePen.Dispose();&lt;br /&gt;
    Color semiTransparentColor = Color.FromArgb(128, color.R, color.G, color.B);&lt;br /&gt;
    Pen semiTransparentPen = new Pen(semiTransparentColor, penWidth);&lt;br /&gt;
    e.Graphics.DrawLine(semiTransparentPen, 0, 200, 200, 140);&lt;br /&gt;
        semiTransparentPen.Dispose();&lt;br /&gt;
    Color veryTransparentColor = Color.FromArgb(77, color.R, color.G, color.B);&lt;br /&gt;
    Pen veryTransparentPen = new Pen(veryTransparentColor, penWidth);&lt;br /&gt;
    e.Graphics.DrawLine(veryTransparentPen, 0, 350, 200, 260);&lt;br /&gt;
        veryTransparentPen.Dispose();&lt;br /&gt;
  &lt;br /&gt;
    Brush transparentBrush = new SolidBrush(semiTransparentColor);&lt;br /&gt;
    e.Graphics.DrawString(&amp;quot;www.nfex.ru&amp;quot;, new Font(&amp;quot;Verdana&amp;quot;, 36, FontStyle.Bold),&lt;br /&gt;
      transparentBrush, 80, 150);&lt;br /&gt;
  }&lt;br /&gt;
  private void InitializeComponent()&lt;br /&gt;
  {&lt;br /&gt;
    this.SuspendLayout();&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(292, 266);&lt;br /&gt;
    this.Name = &amp;quot;Form1&amp;quot;;&lt;br /&gt;
    this.Text = &amp;quot;Alpha Blending&amp;quot;;&lt;br /&gt;
    this.Paint += new System.Windows.Forms.PaintEventHandler(this.Form1_Paint);&lt;br /&gt;
    this.ResumeLayout(false);&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;
  &amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Color.FromArgb (int r, int g, int b)==&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 ColorChips : Form {&lt;br /&gt;
  public ColorChips() {&lt;br /&gt;
    Size = new Size(300,300);&lt;br /&gt;
    Text = &amp;quot;Color Chips&amp;quot;;&lt;br /&gt;
  }&lt;br /&gt;
  protected override void OnPaint(PaintEventArgs e)   {&lt;br /&gt;
    Graphics g = e.Graphics;&lt;br /&gt;
    int h = DisplayRectangle.Height;&lt;br /&gt;
    int w = DisplayRectangle.Width;&lt;br /&gt;
    Random r = new Random();&lt;br /&gt;
    for (int i = 0; i &amp;lt; 10; i++){&lt;br /&gt;
      for (int j = 0; j &amp;lt; 10; j++) {&lt;br /&gt;
        Color color = Color.FromArgb (r.Next(256), r.Next(256), r.Next(256));&lt;br /&gt;
        Brush brush = new SolidBrush(color); &lt;br /&gt;
        g.FillRectangle(brush, i*w/10, j*h/10, w/10, h/10);&lt;br /&gt;
      } &lt;br /&gt;
    }  &lt;br /&gt;
    base.OnPaint(e);&lt;br /&gt;
  }&lt;br /&gt;
  static void Main() {&lt;br /&gt;
    Application.Run(new ColorChips());&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;
==Color.FromKnownColor==&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.Collections;&lt;br /&gt;
using System.ruponentModel;&lt;br /&gt;
using System.Windows.Forms;&lt;br /&gt;
using System.Data;&lt;br /&gt;
namespace ColorChanger&lt;br /&gt;
{&lt;br /&gt;
    public class ColorChanger : System.Windows.Forms.Form&lt;br /&gt;
    {&lt;br /&gt;
        internal System.Windows.Forms.Label lblSaturation;&lt;br /&gt;
        internal System.Windows.Forms.Label lblHue;&lt;br /&gt;
        internal System.Windows.Forms.Label lblBrightness;&lt;br /&gt;
        internal System.Windows.Forms.Label Label1;&lt;br /&gt;
        internal System.Windows.Forms.ListBox lstColors;&lt;br /&gt;
        private System.ruponentModel.Container components = null;&lt;br /&gt;
        public ColorChanger()&lt;br /&gt;
        {&lt;br /&gt;
            InitializeComponent();&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;
        #region Windows Form Designer generated code&lt;br /&gt;
        private void InitializeComponent()&lt;br /&gt;
        {&lt;br /&gt;
            this.lblSaturation = new System.Windows.Forms.Label();&lt;br /&gt;
            this.lblHue = new System.Windows.Forms.Label();&lt;br /&gt;
            this.lblBrightness = new System.Windows.Forms.Label();&lt;br /&gt;
            this.Label1 = new System.Windows.Forms.Label();&lt;br /&gt;
            this.lstColors = new System.Windows.Forms.ListBox();&lt;br /&gt;
            this.SuspendLayout();&lt;br /&gt;
            this.lblSaturation.BackColor = System.Drawing.SystemColors.ActiveCaptionText;&lt;br /&gt;
            this.lblSaturation.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;&lt;br /&gt;
            this.lblSaturation.FlatStyle = System.Windows.Forms.FlatStyle.System;&lt;br /&gt;
            this.lblSaturation.Location = new System.Drawing.Point(264, 56);&lt;br /&gt;
            this.lblSaturation.Name = &amp;quot;lblSaturation&amp;quot;;&lt;br /&gt;
            this.lblSaturation.Size = new System.Drawing.Size(136, 20);&lt;br /&gt;
            this.lblSaturation.TabIndex = 9;&lt;br /&gt;
            this.lblSaturation.Text = &amp;quot; Saturation&amp;quot;;&lt;br /&gt;
            this.lblHue.BackColor = System.Drawing.SystemColors.ActiveCaptionText;&lt;br /&gt;
            this.lblHue.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;&lt;br /&gt;
            this.lblHue.FlatStyle = System.Windows.Forms.FlatStyle.System;&lt;br /&gt;
            this.lblHue.Location = new System.Drawing.Point(264, 32);&lt;br /&gt;
            this.lblHue.Name = &amp;quot;lblHue&amp;quot;;&lt;br /&gt;
            this.lblHue.Size = new System.Drawing.Size(136, 20);&lt;br /&gt;
            this.lblHue.TabIndex = 8;&lt;br /&gt;
            this.lblHue.Text = &amp;quot; Hue&amp;quot;;&lt;br /&gt;
            this.lblBrightness.BackColor = System.Drawing.SystemColors.ActiveCaptionText;&lt;br /&gt;
            this.lblBrightness.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;&lt;br /&gt;
            this.lblBrightness.FlatStyle = System.Windows.Forms.FlatStyle.System;&lt;br /&gt;
            this.lblBrightness.Location = new System.Drawing.Point(264, 8);&lt;br /&gt;
            this.lblBrightness.Name = &amp;quot;lblBrightness&amp;quot;;&lt;br /&gt;
            this.lblBrightness.Size = new System.Drawing.Size(136, 20);&lt;br /&gt;
            this.lblBrightness.TabIndex = 7;&lt;br /&gt;
            this.lblBrightness.Text = &amp;quot; Brightness&amp;quot;;&lt;br /&gt;
            this.Label1.BackColor = System.Drawing.SystemColors.ActiveCaptionText;&lt;br /&gt;
            this.Label1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;&lt;br /&gt;
            this.Label1.FlatStyle = System.Windows.Forms.FlatStyle.System;&lt;br /&gt;
            this.Label1.Location = new System.Drawing.Point(8, 8);&lt;br /&gt;
            this.Label1.Name = &amp;quot;Label1&amp;quot;;&lt;br /&gt;
            this.Label1.Size = new System.Drawing.Size(200, 20);&lt;br /&gt;
            this.Label1.TabIndex = 6;&lt;br /&gt;
            this.Label1.Text = &amp;quot; Choose a Background Color:&amp;quot;;&lt;br /&gt;
            this.lstColors.Location = new System.Drawing.Point(8, 36);&lt;br /&gt;
            this.lstColors.Name = &amp;quot;lstColors&amp;quot;;&lt;br /&gt;
            this.lstColors.Size = new System.Drawing.Size(200, 238);&lt;br /&gt;
            this.lstColors.TabIndex = 5;&lt;br /&gt;
            this.lstColors.SelectedIndexChanged += new System.EventHandler(this.lstColors_SelectedIndexChanged);&lt;br /&gt;
            this.AutoScaleBaseSize = new System.Drawing.Size(5, 14);&lt;br /&gt;
            this.ClientSize = new System.Drawing.Size(472, 290);&lt;br /&gt;
            this.Controls.AddRange(new System.Windows.Forms.Control[] {&lt;br /&gt;
                                                                          this.lblSaturation,&lt;br /&gt;
                                                                          this.lblHue,&lt;br /&gt;
                                                                          this.lblBrightness,&lt;br /&gt;
                                                                          this.Label1,&lt;br /&gt;
                                                                          this.lstColors});&lt;br /&gt;
            this.Font = new System.Drawing.Font(&amp;quot;Tahoma&amp;quot;, 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));&lt;br /&gt;
            this.Name = &amp;quot;ColorChanger&amp;quot;;&lt;br /&gt;
            this.Text = &amp;quot;Color Changer&amp;quot;;&lt;br /&gt;
            this.Load += new System.EventHandler(this.ColorChanger_Load);&lt;br /&gt;
            this.ResumeLayout(false);&lt;br /&gt;
        }&lt;br /&gt;
        #endregion&lt;br /&gt;
        [STAThread]&lt;br /&gt;
        static void Main() &lt;br /&gt;
        {&lt;br /&gt;
            Application.Run(new ColorChanger());&lt;br /&gt;
        }&lt;br /&gt;
        private void ColorChanger_Load(object sender, System.EventArgs e)&lt;br /&gt;
        {&lt;br /&gt;
            string[] colorNames;&lt;br /&gt;
            colorNames = System.Enum.GetNames(typeof(KnownColor));&lt;br /&gt;
            lstColors.Items.AddRange(colorNames);&lt;br /&gt;
        }&lt;br /&gt;
        private void lstColors_SelectedIndexChanged(object sender, System.EventArgs e)&lt;br /&gt;
        {&lt;br /&gt;
            KnownColor selectedColor;&lt;br /&gt;
            selectedColor = (KnownColor)System.Enum.Parse(typeof(KnownColor), lstColors.Text);&lt;br /&gt;
            &lt;br /&gt;
            this.BackColor = System.Drawing.Color.FromKnownColor(selectedColor);&lt;br /&gt;
            &lt;br /&gt;
            lblBrightness.Text = &amp;quot;Brightness = &amp;quot; +this.BackColor.GetBrightness().ToString();&lt;br /&gt;
            lblHue.Text = &amp;quot;Hue = &amp;quot; + this.BackColor.GetHue().ToString();&lt;br /&gt;
            lblSaturation.Text = &amp;quot;Saturation = &amp;quot; + this.BackColor.GetSaturation().ToString();&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;
==Color.FromName==&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;
&lt;br /&gt;
public class MainClass{&lt;br /&gt;
   public static void Main(){&lt;br /&gt;
    Color currColor = Color.FromName(&amp;quot;Blue&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;
==Color.LightGray==&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;
C# Programming Tips &amp;amp; Techniques&lt;br /&gt;
by Charles Wright, Kris Jamsa&lt;br /&gt;
Publisher: Osborne/McGraw-Hill (December 28, 2001)&lt;br /&gt;
ISBN: 0072193794&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 AddControls&lt;br /&gt;
{&lt;br /&gt;
  /// &amp;lt;summary&amp;gt;&lt;br /&gt;
  /// Summary description for FormAddControls.&lt;br /&gt;
  /// &amp;lt;/summary&amp;gt;&lt;br /&gt;
  public class FormAddControls : System.Windows.Forms.Form&lt;br /&gt;
  {&lt;br /&gt;
    private System.Windows.Forms.ListBox listBox1;&lt;br /&gt;
    private System.Windows.Forms.Button button1;&lt;br /&gt;
    private System.Windows.Forms.TextBox textBox1;&lt;br /&gt;
    private System.Windows.Forms.Button button2;&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 FormAddControls()&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.textBox1 = new System.Windows.Forms.TextBox();&lt;br /&gt;
      this.button1 = new System.Windows.Forms.Button();&lt;br /&gt;
      this.button2 = new System.Windows.Forms.Button();&lt;br /&gt;
      this.listBox1 = new System.Windows.Forms.ListBox();&lt;br /&gt;
      this.SuspendLayout();&lt;br /&gt;
      // &lt;br /&gt;
      // textBox1&lt;br /&gt;
      // &lt;br /&gt;
      this.textBox1.Location = new System.Drawing.Point(38, 200);&lt;br /&gt;
      this.textBox1.Name = &amp;quot;textBox1&amp;quot;;&lt;br /&gt;
      this.textBox1.Size = new System.Drawing.Size(216, 20);&lt;br /&gt;
      this.textBox1.TabIndex = 1;&lt;br /&gt;
      this.textBox1.Text = &amp;quot;&amp;quot;;&lt;br /&gt;
      // &lt;br /&gt;
      // button1&lt;br /&gt;
      // &lt;br /&gt;
      this.button1.Location = new System.Drawing.Point(48, 240);&lt;br /&gt;
      this.button1.Name = &amp;quot;button1&amp;quot;;&lt;br /&gt;
      this.button1.Size = new System.Drawing.Size(80, 24);&lt;br /&gt;
      this.button1.TabIndex = 2;&lt;br /&gt;
      this.button1.Text = &amp;quot;Add Item&amp;quot;;&lt;br /&gt;
      this.button1.Click += new System.EventHandler(this.button1_Click);&lt;br /&gt;
      this.button1.MouseEnter += new System.EventHandler(this.Buttons_OnMouseEnter);&lt;br /&gt;
      this.button1.MouseLeave += new System.EventHandler(this.Buttons_OnMouseLeave);&lt;br /&gt;
      // &lt;br /&gt;
      // button2&lt;br /&gt;
      // &lt;br /&gt;
      this.button2.Location = new System.Drawing.Point(160, 240);&lt;br /&gt;
      this.button2.Name = &amp;quot;button2&amp;quot;;&lt;br /&gt;
      this.button2.Size = new System.Drawing.Size(96, 24);&lt;br /&gt;
      this.button2.TabIndex = 3;&lt;br /&gt;
      this.button2.Text = &amp;quot;Cancel&amp;quot;;&lt;br /&gt;
      this.button2.Click += new System.EventHandler(this.button2_Click);&lt;br /&gt;
      this.button2.MouseEnter += new System.EventHandler(this.Buttons_OnMouseEnter);&lt;br /&gt;
      this.button2.MouseLeave += new System.EventHandler(this.Buttons_OnMouseLeave);&lt;br /&gt;
      // &lt;br /&gt;
      // listBox1&lt;br /&gt;
      // &lt;br /&gt;
      this.listBox1.Location = new System.Drawing.Point(38, 32);&lt;br /&gt;
      this.listBox1.Name = &amp;quot;listBox1&amp;quot;;&lt;br /&gt;
      this.listBox1.Size = new System.Drawing.Size(216, 147);&lt;br /&gt;
      this.listBox1.TabIndex = 0;&lt;br /&gt;
      // &lt;br /&gt;
      // FormAddControls&lt;br /&gt;
      // &lt;br /&gt;
      this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);&lt;br /&gt;
      this.ClientSize = new System.Drawing.Size(292, 273);&lt;br /&gt;
      this.Controls.AddRange(new System.Windows.Forms.Control[] {&lt;br /&gt;
                                      this.button2,&lt;br /&gt;
                                      this.button1,&lt;br /&gt;
                                      this.textBox1,&lt;br /&gt;
                                      this.listBox1});&lt;br /&gt;
      this.Name = &amp;quot;FormAddControls&amp;quot;;&lt;br /&gt;
      this.Text = &amp;quot;FormAddControls&amp;quot;;&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 FormAddControls());&lt;br /&gt;
    }&lt;br /&gt;
    private void button1_Click(object sender, System.EventArgs e)&lt;br /&gt;
    {&lt;br /&gt;
      if (textBox1.Text == &amp;quot;&amp;quot;)&lt;br /&gt;
        return;&lt;br /&gt;
      string strAdd = textBox1.Text;&lt;br /&gt;
      if (listBox1.FindString (strAdd, -1) &amp;lt; 0)&lt;br /&gt;
      {&lt;br /&gt;
        listBox1.Items.Add (strAdd);&lt;br /&gt;
        textBox1.Text = &amp;quot;&amp;quot;;&lt;br /&gt;
        textBox1.Focus ();&lt;br /&gt;
        return;&lt;br /&gt;
      }&lt;br /&gt;
      MessageBox.Show (&amp;quot;\&amp;quot;&amp;quot; + strAdd + &amp;quot;\&amp;quot; is already in the list box&amp;quot;, &amp;quot;Duplicate&amp;quot;);&lt;br /&gt;
    }&lt;br /&gt;
    private void button2_Click(object sender, System.EventArgs e)&lt;br /&gt;
    {&lt;br /&gt;
      Application.Exit();&lt;br /&gt;
    }&lt;br /&gt;
    private void Buttons_OnMouseEnter(object sender, System.EventArgs e)&lt;br /&gt;
    {&lt;br /&gt;
      Button btn = (Button) sender;&lt;br /&gt;
      btn.BackColor = Color.LightGray;&lt;br /&gt;
    }&lt;br /&gt;
    private void Buttons_OnMouseLeave(object sender, System.EventArgs e)&lt;br /&gt;
    {&lt;br /&gt;
      Button btn = (Button) sender;&lt;br /&gt;
      btn.BackColor = SystemColors.Control;&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;
==Color.Tomato==&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 MainForm : System.Windows.Forms.Form&lt;br /&gt;
  {&lt;br /&gt;
    private System.ruponentModel.Container components;&lt;br /&gt;
    public MainForm()&lt;br /&gt;
    {&lt;br /&gt;
      InitializeComponent();&lt;br /&gt;
      BackColor = Color.Tomato;&lt;br /&gt;
      Opacity = 0.5d;&lt;br /&gt;
      Text = &amp;quot;www.nfex.ru&amp;quot;;&lt;br /&gt;
      Cursor = Cursors.WaitCursor;&lt;br /&gt;
      this.Paint += new System.Windows.Forms.PaintEventHandler(this.Form1_Paint);&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.AutoScaleBaseSize = new System.Drawing.Size(5, 13);&lt;br /&gt;
      this.ClientSize = new System.Drawing.Size(292, 273);&lt;br /&gt;
      this.Text = &amp;quot;Form1&amp;quot;;&lt;br /&gt;
    }&lt;br /&gt;
    [STAThread]&lt;br /&gt;
    static void Main() &lt;br /&gt;
    {&lt;br /&gt;
      Application.Run(new MainForm());&lt;br /&gt;
    }&lt;br /&gt;
    private void Form1_Paint(object sender, System.Windows.Forms.PaintEventArgs e)&lt;br /&gt;
    {&lt;br /&gt;
      Graphics g = e.Graphics;&lt;br /&gt;
      g.DrawString(&amp;quot;www.nfex.ru&amp;quot;, &lt;br /&gt;
        new Font(&amp;quot;Times New Roman&amp;quot;, 20), &lt;br /&gt;
        new SolidBrush(Color.Black), 40, 10);&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;
==Color.White==&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 InheritTheForm: Form&lt;br /&gt;
{&lt;br /&gt;
     public static void Main()&lt;br /&gt;
     {&lt;br /&gt;
          InheritTheForm form = new InheritTheForm();&lt;br /&gt;
          form.Text = &amp;quot;Inherit the Form&amp;quot;;&lt;br /&gt;
          form.BackColor = Color.White;&lt;br /&gt;
   &lt;br /&gt;
          Application.Run(form);&lt;br /&gt;
     }&lt;br /&gt;
}&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>