Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

trapping mouse in picture box

Status
Not open for further replies.

gfreeman1

Programmer
Oct 14, 2000
3
US
How would i go about trapping the mouse inside the picture box that i am drawing a line in? I have absolutely no idea how to do this. If someone could give me some pointers i would really appreciate this. [sig][/sig]
 
I guess my opinion is that the user should be allowed to leave the picture box, even if they are in the middle of adding a line. Go to MS Word, turn on the drawing toolbar, and add a line. You'll notice if you add the first point on the document, then drag off the application, the line gets pasted based on your drop point even though it is off the document. The line goes to the edge of the document.

Another option would be to change the icon to vbNoDrop (the circle with a line) and then not add the line if the user drops the endpoint while outside the picture box.

At any rate, I think either of those would provide a more forgiving user interface that not letting the mouse leave the picture box. [sig][/sig]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top