I have a picturebox control where I load a 50x160 BMP image, using this:
Picture1.Picture = LoadPicture(App.Path & "\test.bmp")
Once the picture is loaded, I want to get the color of a specific pixel:
GetPixel(Picture1.hDC, 0, 0)
Picture1.Point(0, 0)
I have tried the 8000 pixels (using a loop, obviously) and every function call (GetPixel
and Point
) always return -1
. The first time I test this it works perfectly, and now it magically doesn't work.
Any ideas?