Tech or Treat! Write an article about your scariest tech disaster to win gadgets!Learn more

x
?
Solved

How can I draw a line?

Posted on 2007-11-16
5
Medium Priority
?
215 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
5 Comments
 
LVL 55

Accepted Solution

by:
Jaime Olivares earned 1600 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 400 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

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

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

More often than not, we developers are confronted with a need: a need to make some kind of magic happen via code. Whether it is for a client, for the boss, or for our own personal projects, the need must be satisfied. Most of the time, the Framework…
A long time ago (May 2011), I have written an article showing you how to create a DLL using Visual Studio 2005 to be hosted in SQL Server 2005. That was valid at that time and it is still valid if you are still using these versions. You can still re…
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…

647 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