Results 1 to 3 of 3

Thread: detecting mouse hit on a graphic line

  1. #1

    Thread Starter
    New Member
    Join Date
    Apr 2005
    Posts
    8

    detecting mouse hit on a graphic line

    I would like to be able to place a line dynamically through the user interface of a form or another suitable container and then be able to detect a mousemove /mousedown/mouseup. Can this be done? The intention is to enable a user to interactively connect objects rather as in a flow diagram.

    Thanks in advance

  2. #2
    I'm about to be a PowerPoster! Joacim Andersson's Avatar
    Join Date
    Jan 1999
    Location
    Sweden
    Posts
    14,649

    Re: detecting mouse hit on a graphic line

    You could check the color of the current pixel the mouse is over in the MouseMove and MouseDown events. This can be done either using the VB Point method or the GetPixel API function.

  3. #3

    Thread Starter
    New Member
    Join Date
    Apr 2005
    Posts
    8

    Re: detecting mouse hit on a graphic line

    Sorry, I should have made myself clearer. What I really want to do is detect a specific line from a arrayof lines. I know I can do the math to find an intersecting point, but I'm hoping there may be a smarter way to do this.

    jeffow

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