VB6 / API / Selecting on-screen graphics objects

0 pts.
Tags:
Visual Basic
I am writing an app. which requires the user to select on screen graphics objects which can be lines, rectangles, odd-shaped polygons etc. Have used API calls like 'PtInRegion' to sort out most of the objects but am stuck on Line objects. Is there an API function to determine whether a point is on a straight line with known end points? If not... Can someone reccommend a good approach in VB6. Thanks in advance
ASKED: August 9, 2006  6:33 PM
UPDATED: August 10, 2006  9:44 AM

Answer Wiki

Thanks. We'll let you know when a new response is added.

What kind of control are you using? In my app I put objects in a picturebox control and use the line method to draw the line. Then I store my coordinates and my object class in a collection. When you get the X and Y coordinates on a mouse click you must search the collection to find the object the user clicked on.

Good Luck

Discuss This Question:  

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following