Quantcast
Channel: VBForums - Visual Basic .NET
Viewing all articles
Browse latest Browse all 27349

VS 2010 Image shrinking

$
0
0
Hi All,

I am doing one image viewer app, in that I have 2 thumbnails and one current image viewer, by loading its working fine. But when I tried to move next image the current image shrinking to small size, I want a fixed size for all the image while clicking next and prev buttons. Following is the code to show the current image, check and let me have your ideas, thanks in advance.

Code:

  ' set current image
        If mImagePosition < mImageList.Count Then
            Try
                ' set delegate
                Dim currentCallback = _
                        New Image.GetThumbnailImageAbort(AddressOf ThumbnailCallback)
                ' get the current image
                Dim currentBmp As _
                        New Bitmap(mImageList(mImagePosition).ToString())
                ' thumbnail the image to the size
                ' of the picture box
                mCurrentImage = _
                currentBmp.GetThumbnailImage(576, 427, Nothing, Nothing)
                ' set the picture box image
                picMainPicture.Image = mCurrentImage
                ' clear everything out
                currentBmp = Nothing
                mCurrentImage = Nothing
                currentCallback = Nothing
            Catch
                'stall if it hangs, the user can retry
            End Try
        End If


Viewing all articles
Browse latest Browse all 27349

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>