PC SOFT

FOROS PROFESIONALES
WINDEVWEBDEV y WINDEV Mobile

Inicio → WINDEV 2024 → dPixelColor command
dPixelColor command
Iniciado por dd, 11,may. 2019 22:43 - 1 respuesta
Publicado el 11,mayo 2019 - 22:43
positioning x/y does not work like it supose to
code brick does work for different cordinates but not for all
why cant i retrieve the coller of pixel x1/y1 of the img control?
i used code below

dStartDrawing(IMG_NoName1)
nPixelColor is int
nPixelColor = dPixelColor(IMG_NoName1, 1, 1)
Trace(nPixelColor)
Publicado el 13,mayo 2019 - 11:32
Hello.
I think that the coordinates are relative to the screen and not to the image control.
Please put the code in the "mouse rollover" of the image to conclude how it works:

dStartDrawing(IMG_NoName1)
nPixelColor is int
nPixelColor = dPixelColor(IMG_NoName1, MouseXPos(), MouseYPos())
Trace(nPixelColor)

Hope it helps.
Regards,
Bruno