How can I draw a line?

Hello,

There's was a line control in VB 6, it's not available in C# 2.0.

How can I have one on my form?

Thanks.
EEssamAsked:
Who is Participating?
 
Jaime OlivaresSoftware ArchitectCommented:
For vertical and horizontal lines, use a PictureBox.
Set BorderStyle to FixedSingle or Fixed3D
Set Width or Height to 1
0
 
Alexandre SimõesManager / Technology SpecialistCommented:
You can't...
You can have containers that draw on themselves but the "good" old VB6 Line is gone...

Something like jaime_olivares said is usually used... I use Labels, I think they're somewhat lighter.
0
 
EEssamAuthor Commented:
It seems to do the trick but how can I change the line color?
0
 
Jaime OlivaresSoftware ArchitectCommented:
Also you can use a Panel control and change the Background property
0
 
Jaime OlivaresSoftware ArchitectCommented:
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.