Getting RGB values?

Hello,

I urgently need Xojo for a project where I need the RGB values at the current cursor position all over the screen. In a tutorial for the old Realbasic I found:

dim c as color c=System.Pixel(System.MouseX, SystemMouseY)

I saw that Sytem.Pixel is no longer available. Can anybody give me an alternative code for the new Xojo version?

Thanks a lot!
Micha

Search in the language reference for “RGBsurface”. I think that is exactly what you need.

Here is the structure from the Language Reference :

RGBSurface.Pixel ( x as Integer, y as Integer ) As Color

Have a nice day!

RGBSurface does not read the screen…

HOWEVER depending on exactly what you need to do… you can take a snapshot
of a window… and use RGBSurface on the resulting PICTURE object

window1.drawinto