Last post Jan 23, 2006 07:54 PM by Dennisffm
Jan 20, 2006 10:00 PM|Dennisffm|LINK
I need to draw a line to display changes of numbers?
Firstly ,I need to access Oracle database, and extract data. Then in accordance with these data, draw a line.
Jan 21, 2006 12:52 PM|sbyard|LINK
Since you are in teh GDI area, I assume you want some control over colour ,angle, etc.
Create a bitmap of some convenient size. Use GDI to draw the lines, text, circles, or whatever. Render the bitmap to the web page (can be as gif, jpeg, etc.). You will find plenty of articles around the web on this
Jan 21, 2006 12:59 PM|Jigar|LINK
If you want to draw line then following code will do that for you.
// Create Bitmap
System.Drawing.Bitmap bmp =
new System.Drawing.Bitmap(100, 100);
// Get Graphics object
System.Drawing.Graphics g = System.Drawing.Graphics.FromImage(bmp);
// Create white background
// Draw Line
g.DrawLine(System.Drawing.Pens.Black, 10, 10, 100, 10);
Also read about other overloads for
Graphics.DrawLine Method on msdn
Jan 23, 2006 01:07 AM|Dennisffm|LINK
Jan 23, 2006 12:22 PM|Jigar|LINK
This is VB Code which creates image, draws line on image streams back to browser. copy and paste that code in your aspx page and run.
I do not work in VB but it took me 1 minute to find a place which can convert my
C# code to VB on google.
Page Language="vb" %>
Import Namespace="System.Drawing" %>
g.DrawLine(System.Drawing.Pens.Black, 10, 10, 100, 10)
Jan 23, 2006 07:54 PM|Dennisffm|LINK
Jigar, Thank you very very much.
Your code has worked properly. I hope I can develop my program as soon as possible.