Audax321 Posted August 2, 2003 Posted August 2, 2003 (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 August 2, 2003 by Audax321 Quote
*Experts* Volte Posted August 2, 2003 *Experts* Posted August 2, 2003 Try using the Image.GetThumbnailImage method. Quote
Audax321 Posted August 2, 2003 Author Posted August 2, 2003 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.... Quote
*Experts* Volte Posted August 2, 2003 *Experts* Posted August 2, 2003 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 Quote
Audax321 Posted August 2, 2003 Author Posted August 2, 2003 Thank you, that worked perfectly. :) Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.