ok why doesnt GetPixel work half the time??
most of the time it returns -1 !
I've tried turning autoredraw (of the picbox im using) on and off, etc, and it still keeps returning -1 often. Sometimes it doesnt though ?)
help!
Printable View
ok why doesnt GetPixel work half the time??
most of the time it returns -1 !
I've tried turning autoredraw (of the picbox im using) on and off, etc, and it still keeps returning -1 often. Sometimes it doesnt though ?)
help!
Code example, please.
Check your loops, you often get -1 if you go outside the area. This can happen if you hit the border of a form or if you have the form set to twips and loop to the edge of a control (in pixel count you'd be going way off the edge)
chuck some of the data to the imediate window and see where you're "GET"ing
I noticed that GetPixel also returns -1 if stepping through the code with F8. Set your breakpoint after GetPixel if your debugging.
it works now I think, thanks :)