PIXEL

USUARIO.EXCLUIDOS 05/06/2005 12:07:36
#87079
Gostaria de saber como faz para saber o pixel que a gente está passando o mouse por cima?
GABRIEL.LOGAN 05/06/2005 13:55:09
#87092
Veja se isso te atende:

Private Sub Picture1_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single) 
Cor = Picture1.Point(X, Y)
MsgBox Cor
End Sub


Ou pode usar API:

Private Declare Function GetPixel Lib "gdi32" (ByVal hdc As Long, ByVal X As Long, ByVal Y As Long) As Long 

Private Sub Picture1_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
msgbox GetPixel(Picture1.hdc, X, Y)
End Sub
Tópico encerrado , respostas não são mais permitidas