|
-
Apr 12th, 2002, 08:37 AM
#1
using the Line control
I am new to Visual Basic (I'm using 6.0) and I have stumbled over the following problem: on the main form, the user can draw a line between two points. I have used the Line contol to place the line on the form, but know I want to allow the user to select it and delete it (just like in the Paint application). However, the Line control doesn't have a Click event. Can you please tell me how can I do this? Thanks a lot.
-
Apr 12th, 2002, 12:33 PM
#2
Hyperactive Member
The line does however have a beginning and end. Use these points to determin if point selected is part of the line like:
<vbcode>
if linex1<selectedx and linex2>selectedx AND _
liney1<selectedy and liney2>selectedy THEN
msgbox "You are clicking the line and about to delete it"
cls
end if
<End vbcode/>
-
Apr 12th, 2002, 02:53 PM
#3
Thanks for the prompt reply. I've got the ideea.
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
|