Greetings,
I need to get the color of a pixel in a window that does not necessarily have a canvas object. This use to work: currentColor=tabletop.graphics.pixel(x,y).
The pixel may be within any number of canvases or objects. Jason K offered a partial solution, except I do not use a mouse action event. He used the following
dim s as new Shell
s.Execute “screencapture -c -x”
s.Close
dim clip as new Clipboard
dim p as picture = clip.Picture
clip.Close
dim rgbs as RGBSurface = p.RGBSurface
dim c as color = rgbs.Pixel(system.Mousex, system.mousey)
'Break //c is the color under the mouse
theColor = c
Canvas1.Invalidate
maybe there is an easier way?
Thanks!
CG