How to draw a one pixel line  
Author Message
IllyaTeideman





PostPosted: Tue Aug 01 08:16:05 CDT 2006 Top

Dotnet >> How to draw a one pixel line I want draw a line for saperate form, how do i do?

thx

DotNet306  
 
 
Angelina





PostPosted: Tue Aug 01 08:16:05 CDT 2006 Top

Dotnet >> How to draw a one pixel line Just override the onpaint event of your form and write down :

protected override void OnPaint(PaintEventArgs e)
{
Graphics g = e.Graphics;
g.DrawLine(new Pen(Color.Black), x1, y1, x2, y2);
//x1, y1 is start point and x2, y2 is end point of the line
base.OnPaint (e);
}

cheers ;)
- Angelina

"Sonic" <EMail@HideDomain.com> wrote in message
news:EMail@HideDomain.com...
>I want draw a line for saperate form, how do i do?
>
> thx