Drawing a line in Visual Studio .net at design time

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?

Use the Visual Basic Powerpack (free, from Microsoft, the makers of VB.Net)

The best option is to draw a label and set its properties as follows:

  1. Clear the Text property.
  2. Set the Autosize property to False.
  3. Set BackColor as reqiured.
  4. Set the Enabled property to False (or else it can be moved at run time).
  5. Use Shift + arrows to resize the label, e.g. Shift+ to make a thin line and Shift+ to make a small line.

The best way to draw a line in design time is to add PictureBox and set its properties as follows:

  1. BackColor – select the color you want
  2. Size – ex: width=1 height=300

Leave a Comment