Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Rhinorhino on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

draw a line in web form

Status
Not open for further replies.

adonet

MIS
Joined
May 4, 2004
Messages
312
Location
US
How to draw a line in wev form? I can not find it in tool box.
 
Under the HTML toolbox, there is a horizontal rule.

If this is not what you want, you are going to have to either prepare a gif or something and stick that in there, or if you want it to be dynamic, you are looking at system.drawing to a gif, and embedding that in the page.


Mark [openup]
 
Might not be your answer, but could you create a bitmap of a line N pixels long, and just draw the img to the screen as many times as you need ?

K
 
Thank you. I'll try later and let you know.
 
You can draw lines using the System.Drawing namespace and it's functions.

Code:
Graphics g = this.CreateGraphics();
Pen pen = new Pen(Color.Yellow, 2);
pen.DashStyle = System.Drawing.Drawing2D.DashStyle.DashDot;
g.DrawLine(pen, 0, 0, 100, 200);

HTH,
Keith
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top