|
-
Apr 3rd, 2000, 02:38 PM
#1
Thread Starter
New Member
I have got a collection of lines on a form each called Line1(i), I want to be able to click the mouse on one of the lines and be able to retrieve properties about this line. Can this be done and if it can, how do i do it?? help somebody, please
-
Apr 4th, 2000, 12:28 AM
#2
PowerPoster
I really don't know, it's just an idea:
Code:
Dim A As Long
'X and Y are the mouse coordinates
For A = 0 to Line1.Count - 1
If (Y-Line1(A).Y1) / (X-Line1(A).X1) = (Line1(A).Y2-Y) / (Line1(A).X2-X) Then
'Mouse is on line
EndIf
Next
I think it should work... try it out 
[Edited by Fox on 04-05-2000 at 07:22 PM]
-
Apr 5th, 2000, 12:22 AM
#3
PowerPoster
Uh sorry,
I just tested my code and it works only for lines from top-left to lower-right... anyway, hope I helped ya (I'm sure you can modify the code for the other destinations)
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|