Results 1 to 3 of 3

Thread: Click Part of Image

  1. #1

    Thread Starter
    Member
    Join Date
    Jun 2009
    Posts
    40

    Click Part of Image

    Hey,

    does anyone know How can I for example make if user clicks one one half of the picture box it will msgbox left side and vice versa?

    thankyou

    reguards

    Sumn3rd

  2. #2
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    Re: Click Part of Image

    You'll have to handle the MouseClick event and get the position of the mouse pointer, then use some code to calculate where that is in relation to your target areas. The easiest way would be to define Rectangles to represent those areas and then call their Contains methods to see if they contain the mouse pointer.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

  3. #3
    Lively Member
    Join Date
    Feb 2010
    Posts
    120

    Re: Click Part of Image

    Divide the picture into two and insert two pic box and then insert one half image on one pic box and another half on another box and in _click property msgBox("left") and like this for the right

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width