Solved

How can I draw a line?

Posted on 2007-11-16
5
201 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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
VB.NET 2008 - Windows Protected Your PC 7 41
MVC DDL Json Not Binding to Model 2 27
linq, c# 8 22
C# Linq - Join two objects into one 3 10
For those of you who don't follow the news, or just happen to live under rocks, Microsoft Research released a beta SDK (http://www.microsoft.com/en-us/download/details.aspx?id=27876) for the Xbox 360 Kinect. If you don't know what a Kinect is (http:…
Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …
In an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…

840 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