Jump to content
Xtreme .Net Talk

Recommended Posts

Posted (edited)

Hello,

 

This question is regarding VB .NET. I have a picture box where an image is set (in the image property) and is stretched when the size of the picture box changes. How can I save the stretched version to the hard drive?? Right now when I use:

 

picturebox.image.save(filename)

 

it just saves the original unstretched image.

 

Also, can I set this stretched image directly to the backgroundimage property of a panel without saving it to disk first???

 

Thanks.

Edited by Audax321
Posted

Hello,

 

I think that may work. But, I'm not sure what I should put for this:

 

callback as System.Drawing.Image.GetThumbnailImageAbort

 

I tried looking it up but I'm confused now....

  • *Experts*
Posted
You need to create a GetThumbnailImageAbort delegate sub. It's ignored so it doesn't much matter:
    Private Function ThumbCallback() As Boolean
       Return False
   End Function
   Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
       Dim big As Image, small As Image
       Dim callback As New Image.GetThumbnailImageAbort(AddressOf ThumbCallback)

       '....

       small = big.GetThumbnailImage(10, 10, callback, IntPtr.Zero)
   End Sub

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...