Hi, you need to draw to a bitmap's Graphics object:
Dim b As Bitmap = New Bitmap(100,100)
Dim g As Graphics = Graphics.FromImage(b)
g.DrawLine(Pens.Black, 5,5,50,5)
g.Dispose()
picturebox1.image = b
b.Save(...)
Greetz Peter
--
Programming today is a race between software engineers striving to build
bigger and better idiot-proof programs, and the Universe trying to produce
bigger and better idiots. So far, the Universe is winning. (Rich Cook)
"Yash" <de*********@gmail.com> schreef in bericht
news:11*********************@f14g2000cwb.googlegro ups.com...
Have used DrawLine() method to draw some lines in the picturebox (sort
of a barcode) in the picturebox paint event.
This diagram has to be saved as an image in bmp or tiff format.
But the problem is that these lines are not recognized as the image of
the picturebox.
It shows picturebox.image = nothing.
How do we convert these lines drawn as the image of the picturebox so
that it can be saved.
Thanks for any help.