How can I save an image as a result of a PictureBox.CreateGraphics.DrawLine method ?
sorry, I don't write English very well :o .
Printable View
How can I save an image as a result of a PictureBox.CreateGraphics.DrawLine method ?
sorry, I don't write English very well :o .
umm you mean you want to create a bitmap and draw a line in it, and then save it to a file?
if so you could do something like this:
VB Code:
Dim bmp As New Bitmap(100, 100) ' Create a 100x100 bitmap Dim gr As Graphics = Graphics.FromImage(bmp) gr.Clear(Color.White) ' make the background white gr.DrawLine(Pens.Red, 0, 0, 100, 100) bmp.Save("c:\myBmp.bmp") gr.Dispose() bmp.Dispose()
:D Thanks you very much.