Bitmap b = (Bitmap)pictureBox2.Image; if (e.X >= 0 && e.X <= b.Width && e.Y >= 0 && e.Y <= b.Height) { Color c = b.GetPixel(e.X, e.Y); mouseCOL.Text = "R : " + c.R.ToString() + " G : " + c.G.ToString() + " B : " + c.B.ToString(); pictureBox3.BackColor = Color.FromArgb(c.R, c.B, c.G); }
GetPixel
Color
pictureBox3.BackColor = c;
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)