Can't seem to draw a straight line

  • Thread starter Thread starter Michael Rodriguez
  • Start date Start date
M

Michael Rodriguez

In Delphi there was a control called a Bevel. It would let you draw
straight lines, top, left, right, or bottom, anywhere on your screen.

What is the equivalent in C#? How can I draw a straight line across the
screen?

TIA,

Mike Rodriguez
 
There is no built in line or shape control. You'll need to draw your own
line using the Graphics.DrawLine() method or the ControlPaint class.
Alternatively, you can use a control, such as a Label, set it's BorderStyle
property to FixedSingle and make the control 1 pixel high or set the
BorderStyle to Fixed3D and set the height to 2. If you'd like an actual
control in the ToolBox, I'm sure you can find lots of these types of
controls around the Internet.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top