Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

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 i'm going wrong i would be grateful

 

cheers

  • *Experts*
Posted

You have to use GDI to draw shapes.

 

This works fine for saving images:

PictureBox1.Image.Save("imagepathname.gif", Imaging.ImageFormat.Gif)

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...