"flybird" <li*********@hotmail.com> wrote in message
news:2F**********************************@microsof t.com...
how can I use the line contorl like VB? or draw a line on the Form?
thank you!
You're referring to the VB 6 Line Control, right?
In .NET, you'll need to investigate the System.Drawing namespace and the
Graphics class, which includes the public method DrawLine. Here is a basic
example from the help:
[C#]
public void DrawLineFloat(PaintEventArgs e)
{
// Create pen.
Pen blackPen = new Pen(Color.Black, 3);
// Create coordinates of points that define line.
float x1 = 100.0F;
float y1 = 100.0F;
float x2 = 500.0F;
float y2 = 100.0F;
// Draw line to screen.
e.Graphics.DrawLine(blackPen, x1, y1, x2, y2);
}
--
Peter [MVP Visual Developer]
Jack of all trades, master of none.