|
-
Nov 27th, 1999, 02:12 AM
#1
Thread Starter
Hyperactive Member
How do I create a line as an object on a form that can be selected and moved by the user during runtime? The line control doesn't support this and I can't find anything more about the line method other than it's size and color.
Thanks in advance.
-
Nov 27th, 1999, 02:32 AM
#2
I don't believe that you can have the user select it, but you can move it by changing its X1, X2, Y1 and Y2 properties.
-
Nov 27th, 1999, 06:29 AM
#3
Thread Starter
Hyperactive Member
Thanks for trying Martin but I can't give up. If the answer isn't readily available maybe someone could suggest a source that might teach me to build it?
Thanks again.
-
Nov 27th, 1999, 07:28 PM
#4
Hyperactive Member
Maybe you can use a usercontrol and drop the lines on that.
-
Nov 28th, 1999, 01:29 AM
#5
Try this:
Place a Picturebox on your form. Its width should be the width that you want your line to be, its Appearance should be flat, its BorderStyle should be 0, its DragMode should be 1, and its BackColor should be the same as the BackColor of your form. Draw a line within the picturebox. Reduce the height of the picturebox to 60, and change the Y1 and Y2 properties of the line to 30. (I assume the line is horizontal) Add this code to your form’s DragDrop event Source.Move (X - Source.Width / 2), (Y - Source.Height / 2)
------------------
Marty
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
|