Hi :)
i placed a picturebox and paint on it inside the program with FillRectangle/DrawEllipse/FillEllipse etc.
now all i want is to check if the pixel color under the cursor is == Color.Black
but i encounter problems...
i made this:
Bitmap myBitmap = new Bitmap(this.pictureBox1.Image);
Color pixelColor = myBitmap.GetPixel(Cursor.Position.X, Cursor.Position.Y);
if (pixelColor == Color.Black)
{
//do something...
}
but it gives error on the "this.pictureBox1.Image" it says that its not exist
and when i think about it when i paint on picture box its not goes to be the .Image of it... so what is it? its not BackgroundImage also... what should i enter inside the new Bitmap(???)
Thank u!