I've been playing with the Imagelib - you'll be able to work out why
I have 2 questions:
Why does the form1.getpixel value change when I use exactly the same coordinates but from a sub?
Why do i get an error if I change the "false" to "true" in drawer1.new1("Form1", false)?
You'll note that there is a workaround for the first problem in place. Change the if pixel = cBlack then to if form1.getpixel(x,y) = cBlack then to see the difference
It is better to leave Sub Globals for variables declarations only.
1. The second time you are using GetPixel is after drawing the purple circle.
So the color returned is the small circle color (cPurple).
2. If you want to draw on the forelayer, you need to first create it using:
Form1.ForeLayer = true
I too have had similar problems to this with one of my app's. I was finding that the colour of my image (say white for example) was not being detected as cWhite. When I checked the RGB values of cWhite and my white background I found they were different. As a work around I used GetPixel to obtain the RGB value for the background colour and stored this for use later.
Funny...
There are at least two color constatnt that should always be the same in whatever platform is used...cwhite=rgb(255,255,255);cblack=rgb(0,0,0)