alin picler once su kodu yaziyorsunuz:
[
using System;
using System. Drawing;
using System. Collections;
using System. ComponentModel;
using System. Windows.Forms;
using System. Data;
namespace ColorGuide
{
public class Form1 : System. Windows.Forms. Form
{
private System. ComponentModel.IContainer components;
private System. Windows.Forms. ToolTip toolTip1;
private Panel panel1 = new Panel();
public Form1()
{
InitializeComponent();
//
// TODO: Add any constructor code after InitializeComponent call
//
toolTip1.AutoPopDelay = 5000;
toolTip1.InitialDelay = 1000;
toolTip1.ReshowDelay = 500;
toolTip1.ShowAlways = true;
panel1.Location = new Point(ClientRectangle. Left + 5,ClientRectangle.Top + 5);
panel1.Size = new Size(ClientRectangle. Right-5, ClientRectangle. Bottom-5);
panel1.BorderStyle = System. Windows.Forms. BorderStyle.Fixed3D;
this. Controls.Add(panel1);
int ystart = ClientRectangle.Top;
foreach(string clrName in Enum. GetNames(typeof(KnownColor)))
{
Label lbl = new Label();
lbl. Size = new Size(panel1.Width-20, 20);
lbl. Font = new System. Drawing.Font("Comic Sans MS",10,FontStyle. Bold);
lbl. Text = clrName;
lbl. Location = new Point(ClientRectangle. Left,ystart);
Color backcolor = Color. FromName(clrName);
lbl. BackColor = backcolor;
toolTip1.SetToolTip(lbl, clrName);
Color forecolor = Color. FromArgb(255-backcolor.R,255-backcolor.G,255-backcolor.B);
lbl. ForeColor = forecolor;
lbl. BorderStyle = System. Windows.Forms. BorderStyle.Fixed3D;
panel1.Controls.Add(lbl);
if((lbl. Location.Y > panel1.Location.Y))
{
panel1.AutoScroll = true;
}
ystart += 20;
}
this. Size = new Size(315, 300);
this. Text = "A Color Guide – JAYANT Simplified";
this. MaximizeBox = false;
this. FormBorderStyle = FormBorderStyle. FixedDialog;
this. StartPosition = FormStartPosition. CenterScreen;
}
protected override void Dispose( bool disposing )
{
if( disposing )
{
if (components != null)
{
components. Dispose();
}
}
base. Dispose( disposing );
}
5.
region Windows Form Designer generated code
private void InitializeComponent()
{
this. components = new System. ComponentModel.Container();
this. toolTip1 = new System. Windows.Forms. ToolTip(this. components);
this. AutoScaleBaseSize = new System. Drawing.Size(5, 13);
this. ClientSize = new System. Drawing.Size(292, 273);
this. Name = "Form1";
this. Text = "Form1";
}
6.
endregion
[STAThread]
static void Main()
{
Application.Run(new Form1());
}
}
}
]
sonra yazmak istediginiz cumleyi yazarak yanina [/eof] yaziyorsunuz.
ornek: [kod]mavi[/eof]
calisan ornek: [using System;
using System. Drawing;
using System. Collections;
using System. ComponentModel;
using System. Windows.Forms;
using System. Data;
namespace ColorGuide
{
public class Form1 : System. Windows.Forms. Form
{
private System. ComponentModel.IContainer components;
private System. Windows.Forms. ToolTip toolTip1;
private Panel panel1 = new Panel();
public Form1()
{
InitializeComponent();
//
// TODO: Add any constructor code after InitializeComponent call
//
toolTip1.AutoPopDelay = 5000;
toolTip1.InitialDelay = 1000;
toolTip1.ReshowDelay = 500;
toolTip1.ShowAlways = true;
panel1.Location = new Point(ClientRectangle. Left + 5,ClientRectangle.Top + 5);
panel1.Size = new Size(ClientRectangle. Right-5, ClientRectangle. Bottom-5);
panel1.BorderStyle = System. Windows.Forms. BorderStyle.Fixed3D;
this. Controls.Add(panel1);
int ystart = ClientRectangle.Top;
foreach(string clrName in Enum. GetNames(typeof(KnownColor)))
{
Label lbl = new Label();
lbl. Size = new Size(panel1.Width-20, 20);
lbl. Font = new System. Drawing.Font("Comic Sans MS",10,FontStyle. Bold);
lbl. Text = clrName;
lbl. Location = new Point(ClientRectangle. Left,ystart);
Color backcolor = Color. FromName(clrName);
lbl. BackColor = backcolor;
toolTip1.SetToolTip(lbl, clrName);
Color forecolor = Color. FromArgb(255-backcolor.R,255-backcolor.G,255-backcolor.B);
lbl. ForeColor = forecolor;
lbl. BorderStyle = System. Windows.Forms. BorderStyle.Fixed3D;
panel1.Controls.Add(lbl);
if((lbl. Location.Y > panel1.Location.Y))
{
panel1.AutoScroll = true;
}
ystart += 20;
}
this. Size = new Size(315, 300);
this. Text = "A Color Guide – JAYANT Simplified";
this. MaximizeBox = false;
this. FormBorderStyle = FormBorderStyle. FixedDialog;
this. StartPosition = FormStartPosition. CenterScreen;
}
protected override void Dispose( bool disposing )
{
if( disposing )
{
if (components != null)
{
components. Dispose();
}
}
base. Dispose( disposing );
}
7.
region Windows Form Designer generated code
private void InitializeComponent()
{
this. components = new System. ComponentModel.Container();
this. toolTip1 = new System. Windows.Forms. ToolTip(this. components);
this. AutoScaleBaseSize = new System. Drawing.Size(5, 13);
this. ClientSize = new System. Drawing.Size(292, 273);
this. Name = "Form1";
this. Text = "Form1";
}
8.
endregion
[STAThread]
static void Main()
{
Application.Run(new Form1());
}
}
}]
mavi[/eof]