Drawing a line in Visual Studio .net at design time
-
05-07-2019 - |
Question
The owner of my company wants to be able to draw lines in Visual Studio.net as he did Visual Basic 6.0. So far the only method I have found is a runtime method using system.drawing which of course only work during runtime, and not quite practical for what he wants to do.
Is there any third party control (free or otherwise) that will give him a button at design time to draw lines?
Solution
Use the Visual Basic Powerpack (free, from Microsoft, the makers of VB.Net)
OTHER TIPS
The best way to draw a line in design time is to add PictureBox
and set its properties as follows:
BackColor
- select the color you wantSize
- ex: width=1 height=300
The best option is to draw a label and set its properties as follows:
- Clear the
Text
property. - Set the
Autosize
property toFalse
. - Set
BackColor
as reqiured. - Set the
Enabled
property toFalse
(or else it can be moved at run time). - Use Shift + arrows to resize the label, e.g. Shift+↑ to make a thin line and Shift+← to make a small line.
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow