Picture boxes

Joined
Jul 2, 2003
Messages
17
Location
Ouston, Newcastle Upon Tyne, England
two things can i draw lines and circle and so on in vb.net like i can in vb6 if so how


secondly how do i save images from picture boxes as gifs, bitmaps, png,icons ans so on ive tried

ptbMain.Image.Save(imagestream, System.Drawing.Imaging.ImageFormat.Gif)

but i just get GDI+ generic errors when i try to save as gif, tiff, jpeg, bmp, wmf, emf, or png
or
vaule cannot be null,
parameter name encoder,
i get this one when i try to save as icons

NB in my code sample image stream is a filestream with the parameters (savedialog.filename, filemode create)

if you can help me and/or tell me where im going wrong i would be grateful

cheers
 
You have to use GDI to draw shapes.

This works fine for saving images:
Code:
PictureBox1.Image.Save("imagepathname.gif", Imaging.ImageFormat.Gif)
 
Back
Top