CHECK if mouse is on the two icon in image

User avatar
sal21
PlatinumLounger
Posts: 4355
Joined: 26 Apr 2010, 17:36

CHECK if mouse is on the two icon in image

Post by sal21 »

Possible with mouse_move event to check when the mouse is over the two icon red and blue?

i have tested with:

Code: Select all

Private Sub Picture2_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)

    Dim ColoreEstratto As Long
    Call GetCursorPos(Coord)
    ColoreEstratto = GetPixel(ScreenDC, Coord.X, Coord.Y)
    ColorePixel.BackColor = ColoreEstratto
    SCOLOR = Right("000000" & Hex(ColoreEstratto), 6)
    Colore.Caption = SCOLOR

    Me.LMY.Caption = "LMY: " & Y
    Me.LCY.Caption = "LCY: " & Coord.Y
    'Me.LY.Caption = Round(Y / (Coord.Y * 0.07), 2)
    Me.LMX.Caption = "LMX: " & X
    Me.LCX.Caption = "LCX: " & Coord.X
    'Me.LX.Caption = Round(X / (Coord.X * 0.07), 2)
    
    'Me.LSCALE.Caption = Me.Picture2.ScaleMode

    Select Case SCOLOR
    Case "0003FF"
        Stop
    Case "EAD999", "E7517B"
        Stop
    Case Else
        SCOLOR = ""
    End Select

End Sub
but the big problem is ... the internal color of icon not are solid but have a gradient color!

for help (from documentation of big map):


this code retrive the image

http://dev.virtualearth.net/REST/v1/Im ... SWW_1AJ_1

and this retrive info from the two point on image
http://dev.virtualearth.net/REST/v1/Im ... SWW_1AJ_1

from the last url the code retrive info from the two icon in image(see anchor and other info of coordinate)

i think with this info is possible to check the exactlly position of icon in image

but all is very complex for me
You do not have the required permissions to view the files attached to this post.