Making something happen when the mouse clicks over a certain range of points

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • MarcosGalarza
    New Member
    • May 2010
    • 6

    #1

    Making something happen when the mouse clicks over a certain range of points

    Hello,

    I am trying to click over a certain location. This code does sound reasonable...

    Dim targetlocation as point

    select case targetlocation
    case (849,281) to (885,333)
    me.backgroundim age=nothing
    end case

    this is under mouse click

    the error it gives me it says that you can not use a point to do cases which does not make any sense!

    Someone please help me!

    Thank you :)
  • QVeen72
    Recognized Expert Top Contributor
    • Oct 2006
    • 1445

    #2
    Hi,

    Use an "If .. Then" Condition....
    Also, you need to write code in MouseUp, "Click" event does not pass the X-Y position of the mouse..

    Regards
    Veena

    Comment

    • vb5prgrmr
      Recognized Expert Contributor
      • Oct 2009
      • 305

      #3
      Hmmm... One could also use the mouse move event to change the mouse's icon to notify the user that there is a "hot" zone that they can click on...



      Good Luck

      Comment

      Working...