I
illud
Guest
Bitmap bmp = new Bitmap(1, 1);
using (Graphics g = Graphics.FromImage(bmp))
{
g.CopyFromScreen(System.Windows.Forms.Cursor.Position, new Point(0, 0), new Size(1, 1));
}
System.Drawing.Color pixel = bmp.GetPixel(0, 0);
label3.Text = bmp.GetPixel(0, 0).ToString();
Point p = new Point();
p.X = (this.Width / 2) - (label3.Width / 2);
p.Y = label3.Top;
label3.Location = p;
pictureBox1.BackColor = pixel;
rgbColor = pixel.ToString(); // I want this to be RGB and also HEX
this.Invalidate();
Continue reading...
using (Graphics g = Graphics.FromImage(bmp))
{
g.CopyFromScreen(System.Windows.Forms.Cursor.Position, new Point(0, 0), new Size(1, 1));
}
System.Drawing.Color pixel = bmp.GetPixel(0, 0);
label3.Text = bmp.GetPixel(0, 0).ToString();
Point p = new Point();
p.X = (this.Width / 2) - (label3.Width / 2);
p.Y = label3.Top;
label3.Location = p;
pictureBox1.BackColor = pixel;
rgbColor = pixel.ToString(); // I want this to be RGB and also HEX
this.Invalidate();
Continue reading...