Solved

How can I draw a line?

Posted on 2007-11-16
5
200 Views
Last Modified: 2013-12-17
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.
0
Comment
Question by:EEssam
  • 3
5 Comments
 
LVL 55

Accepted Solution

by:
Jaime Olivares earned 400 total points
ID: 20300751
For vertical and horizontal lines, use a PictureBox.
Set BorderStyle to FixedSingle or Fixed3D
Set Width or Height to 1
0
 
LVL 30

Assisted Solution

by:Alexandre Simões
Alexandre Simões earned 100 total points
ID: 20300798
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
 

Author Comment

by:EEssam
ID: 20300800
It seems to do the trick but how can I change the line color?
0
 
LVL 55

Expert Comment

by:Jaime Olivares
ID: 20300858
Also you can use a Panel control and change the Background property
0
 
LVL 55

Expert Comment

by:Jaime Olivares
ID: 20300883
0

Featured Post

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Many of us here at EE write code. Many of us write exceptional code; just as many of us write exception-prone code. As we all should know, exceptions are a mechanism for handling errors which are typically out of our control. From database errors, t…
Entity Framework is a powerful tool to help you interact with the DataBase but still doesn't help much when we have a Stored Procedure that returns more than one resultset. The solution takes some of out-of-the-box thinking; read on!
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.
Established in 1997, Technology Architects has become one of the most reputable technology solutions companies in the country. TA have been providing businesses with cost effective state-of-the-art solutions and unparalleled service that is designed…

776 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question