how do i get the color of a certain point in a picture box that the user clicks on?
Printable View
how do i get the color of a certain point in a picture box that the user clicks on?
VB Code:
Private Declare Function GetPixel Lib "gdi32" (ByVal hdc As Long, ByVal X As Long, ByVal Y As Long) As Long private sub Picture1_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single) dim lngcolour as long lngcolour = getpixel(picture1.hdc, x/Screen.twipsperpixelx, y/screen.twipsperpixely end sub