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
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.
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