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
Paulus  
#1 Posted : Friday, March 11, 2011 8:57:22 AM(UTC)
Paulus

Rank: Newbie

Groups: Guest
Joined: 3/11/2011(UTC)
Posts: 3

Thanks: 1 times
Hi

I am having trouble with a "ThumbnailListView" windows control on a window form.

I can add the control, load it with thumbnails and all is well until I call up the dialog again and the thumbnails disappear. They are still in the list because the items.count is what I would expect.

Basically I have a main form and I have a dialog form which is created and never disposed. The dialog form has the thumbnaillistview control and is populated with thumbnails only once to increase performance.

The main form uses the showdialog method to show the dialog form and all is well for the first time but the second time the thumbnail items disappear.

If I change the showdialog to show it works fine.


Any ideas ?

Many thanks in advance.

Regards


Paul.
Dmitry.Obukhov  
#2 Posted : Saturday, March 12, 2011 1:12:47 AM(UTC)
Dmitry.Obukhov

Rank: Advanced Member

Groups: Guest
Joined: 5/29/2010(UTC)
Posts: 1,310

Thanks: 8 times
Was thanked: 111 time(s) in 111 post(s)
Hello Paul,

Could you please provide me with complete sample application so that I can check it locally? If it is not possible, please share the code snippet you use with me.

Looking forward to reply from you.
Best regards,
Dmitry Obukhov
Technical Support. Aurigma, Inc.
Paulus  
#3 Posted : Sunday, March 13, 2011 3:39:40 AM(UTC)
Paulus

Rank: Newbie

Groups: Guest
Joined: 3/11/2011(UTC)
Posts: 3

Thanks: 1 times
Hi Dmitry

I have attached a sample project which demonstrates my problem. You will need to correct the image paths within the load of the main form.

What you should find is that when you call up the thumbnail form the first time the thumbnail images are displayed and the second time they disappear. If you examine the items.count property you will see that the image count is correct.

If you change the ".showdialog" method to ".show" then it works fine.

Regards


Paul.

Edited by user Sunday, March 13, 2011 4:00:10 AM(UTC)  | Reason: Not specified

File Attachment(s):
ThumbnailTest.zip (6,374kb) downloaded 2 time(s).
Dmitry.Obukhov  
#4 Posted : Monday, March 14, 2011 12:58:05 AM(UTC)
Dmitry.Obukhov

Rank: Advanced Member

Groups: Guest
Joined: 5/29/2010(UTC)
Posts: 1,310

Thanks: 8 times
Was thanked: 111 time(s) in 111 post(s)
Hello Paul,

Thank you for the sample application and additional info.

Showdialog method is used to show form as a modal dialog box. Show method is used to show modeless windows. Showdialog does not call the Dispose method automatically on its close, and data can be retrieved from the modal form. However, Show disposes upon close, and when you click button to show thumbnails, they are loaded anew.

It is a bug of ThumbnailListView control that thumbnails cannot be loaded from the modal form next times. I posted it to our bug tracker. Our developers will work on this problem.
Best regards,
Dmitry Obukhov
Technical Support. Aurigma, Inc.
thanks 1 user thanked Dmitry.Obukhov for this useful post.
Paulus on 3/14/2011(UTC)
Paulus  
#5 Posted : Monday, March 14, 2011 1:30:25 AM(UTC)
Paulus

Rank: Newbie

Groups: Guest
Joined: 3/11/2011(UTC)
Posts: 3

Thanks: 1 times
Hi Dmitry

Thanks for your reply. I thought it may be something to do with Modal because if the dialog is disposed then it works fine.

Is there a work-around for this in the short term ? I need the form to be Modal (.showdialog) but I want to avoid loading the thumbnails each time.

I did find a way round it by declaring the thumbnailview and it's thumbnails in the mainform once only and passing it as a parameter each time to the dialog form but that's not ideal.


Regards


Paul.
Dmitry.Obukhov  
#6 Posted : Monday, March 14, 2011 1:49:41 AM(UTC)
Dmitry.Obukhov

Rank: Advanced Member

Groups: Guest
Joined: 5/29/2010(UTC)
Posts: 1,310

Thanks: 8 times
Was thanked: 111 time(s) in 111 post(s)
Quote:
Is there a work-around for this in the short term ? I need the form to be Modal (.showdialog) but I want to avoid loading the thumbnails each time.

Unfortunately, there is no workaround.
Quote:
I did find a way round it by declaring the thumbnailview and it's thumbnails in the mainform once only and passing it as a parameter each time to the dialog form but that's not ideal.

I assume it is okay to use in short term.
Best regards,
Dmitry Obukhov
Technical Support. Aurigma, Inc.
Users browsing this topic
Guest (4)
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.