Private Declare Sub CopyMemory Lib "kernel32" Alias "RtlMoveMemory" (Destination As Any, Source As Any, ByVal Length As Long) Private Declare Function GetPixel Lib "gdi32" (ByVal hDC As Long, ByVal X As Long, ByVal Y As Long) As Long
Private Sub Picture1_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single) Dim lColor As Long Dim bColor(1 To 4) As Byte Dim iRed As Integer, iGreen As Integer, iBlue As Integer lColor = GetPixel(Picture1.hDC, X, Y) Call CopyMemory(bColor(1), lColor, Len(lColor)) iRed = bColor(1) iGreen = bColor(2) iBlue = bColor(3) Debug.Print iRed, iGreen, iBlue End Sub
도무지 이해를.못하겠네요..제가 볼적에 구조체를 이용한듯한데.. 역시 창조로 불가능인가요..? |