Does anyone know a way to get the colour value of a pixel in a picturebox control when it is clicked in visual basic 2010?
I have created a small paint application which im using in a kiddies game but I do not want the children to colour over the outline of the image they are colouring in. So to do so I need to check if the currently clicked pixel in the picturebox is not black.
e.g. in pseudo code
if colour not black then Allow pixel to be changed to current colour else Do nothing end if
Best Answer
This is one way you can get a pixel from PictureBox:
Just call it like this: