This forum contains outdated content and is available for reading only. Please contact technical support if you have any questions.

Notification

Icon
Error

Options
Go to last post Go to first unread
firamax  
#1 Posted : Friday, September 28, 2007 9:30:28 PM(UTC)
firamax

Rank: Member

Groups: Guest
Joined: 4/15/2007(UTC)
Posts: 25

Dear Sirs,

in our vb .net application, we try to open a form with thumbnails. Using code from the samples, we did a project.

We attach the "files.zip" file that contains the 3 images that we use, and to test the project you have to unzip the 3 images in root, C:\.

We also attach the testAurigma.zip file. Simply unzip it and open the solution and add the Aurigma.GraphicsMill reference, because is too large in size and we removed it before zipping it.

Now, the project has a form with 3 buttons. By pressing Button 1, it opens a new form and creates and shows the thumbnail. Buttons 2 and 3 is used in order to add new thumbnails with 2 different images. But as you can see, after pressing Button 2 and 3, all the thumbnails get the same image and loses it's previous one!

Any idea what we have to change so we finally see the thumbnails containing the 3 different images ?

firamax

Alex Kon  
#2 Posted : Sunday, September 30, 2007 5:06:31 PM(UTC)
Alex Kon

Rank: Advanced Member

Groups: Guest
Joined: 1/31/2005(UTC)
Posts: 458

Was thanked: 5 time(s) in 5 post(s)
Hello firamax,

The problem is in the following code:

Code:
        Dim imageList As New ImageList
        imageList.ImageSize = New Size(thumbnailSize, thumbnailSize)
        imageList.ColorDepth = ColorDepth.Depth24Bit
        thumbnailsView.LargeImageList = imageList
which is duplicated in jpg(...), png(...) and tiff(...) mehthods. You should create image list once (somewhere in form initialization) and just add new items. The rest of your code works correctly. You can see the result of the suggested modification in the attached picture.

Also I recommend you to replace this string in the ClearView() procedure:

Code:
    thumbnailsView.LargeImageList.Dispose()
with this one:
Code:
   thumbnailsView.LargeImageList.Images.Clear()
It will be more effective to clear existing image list than delete it and create new object.

Edited by user Monday, December 17, 2007 12:33:28 PM(UTC)  | Reason: Not specified

Alex Kon attached the following image(s):
GoodScreenshot.jpg
Users browsing this topic
Guest (3)
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.