get color of a point in a picturebox

Code:
Dim b As Bitmap = PictureBox1.Image
Dim pixelcolor As Color = b.GetPixel(x coord, y coord)
You simply put the image into a Bitmap object and then use the GetPixel method of the Bitmap object to get the color. In this example the variable pixelcolor will now contain the color of the pixel at the specified point.
 
ok. that works fine for images, but what if i want the color of a point on a form? like when i have used a pen object to draw lines and i want to know if a point has been colored by the line?
 
Back
Top