hi, is possible create a "line control" with a UserControl?
I mean their properties x1, y1, x2 and y2 and delete properties Top Left, Width and Height.
and from the ide to use only two points of movement.
Printable View
hi, is possible create a "line control" with a UserControl?
I mean their properties x1, y1, x2 and y2 and delete properties Top Left, Width and Height.
and from the ide to use only two points of movement.
What's stopping you from creating line control (or simply drawing the line) directly on the form? Why do you need user control for that? :confused:
Yes, you can do it, somewhat. You can draw a black'n'white mask on usercontrol that gives you a flat transparency. Alpha transparency is not possible (easily). Having such a mask also has some limitations and the end result will be much heavier than the regular line control, so it doesn't really be very useful of a control. As, it won't work with two end point mechanism, it'll always be a rectangular shape that you draw with a usercontrol (so you have to have a property that tells which corners the control should account for).
Anyway, define better what you're after and you'll probably get a bit better answers :)
LaVolpe has AlphaImage usercontrol that is able to display alpha transparent PNG images, which also allows for rotation. Pretty cool stuff, the project is a bit big and complex though.
I do not mean to be graphic, is very easy to draw a Line with alpha or solid, if windowless and transparent, that is not the question.
the question is how to make a UserControl has only two points slecting as does the control line, two drag points, not four.
is as shown in the image
Greetings.
Nope, you're not getting that. It would require hacking & testing all too much to get such a simple effect and working it in a stable way, you probably can't find anyone that skilled to work with VB6 anymore.
I'm trying to make a user control like the one you want to make, because I need it to implement a class diagrams application. The best I could find is this:
http://www.codeproject.com/KB/miscctrl/linetracker.aspx
Take a look, it may help you. I going to try working with regions on the user control. The last one is a control for VB.NET.