Hi Partners,
I want pass the coords X,Y mouse Pointer and color values of ImageControl to Other Procedure Not im same ImageControl.
i able to get the values, but not retrieve on memory and pass to other procedure.
thank you.
Sample File attached below !
GetPixel-StoreValueXMan1.zip
Private Sub Image1_MouseDown(ByVal Button As Integer, ByVal Shift As Integer, ByVal x As Single, ByVal y As Single)
'''======================================================
Call GetCursorPos(pLocationFrom)
'''======================================================
End Sub
Private Sub Image1_MouseUp(ByVal Button As Integer, ByVal Shift As Integer, ByVal x As Single, ByVal y As Single)
Dim lColour, LastColour As Long
Dim ImageWidth As Long
Dim ImageHeight As Long
Dim ArtWidth As Long
Dim ArtHeight As Long
Dim ExcelArt As Worksheet
Dim MinX, MaxX, MinY, MaxY As Long
Dim ScalingFactor As Integer
lDC = GetWindowDC(0)
ArtWidth = Range("Width").Value
ArtHeight = Range("Height").Value
Dim lColour1Image1 As Long
Dim PixelX1 As Long
Dim PixelY1 As Long
PixelX1 = pLocationFrom.x
PixelY1 = pLocationFrom.y
lColour1Image1 = GetPixel(lDC, PixelX1, PixelY1)
Range("K20").Value = PixelX1
Range("K21").Value = PixelY1
Range("K22").Interior.Color = lColour1Image1
Range("K23").Value = lColour1Image1
Application.ScreenUpdating = True
Application.DisplayAlerts = True
End Sub