VB.net sample code for DoDelete and DoSelectAll

Questions, comments and suggestions concerning VintaSoft Imaging .NET SDK.

Moderator: Alex

Post Reply
communi
Posts: 12
Joined: Wed Jul 13, 2011 11:07 pm

VB.net sample code for DoDelete and DoSelectAll

Post by communi » Wed Aug 10, 2011 11:03 pm

Hi,
I found the simple sample in the helpfile but I think, I'm to stupid to use it ;-) I need a short sample code (VB.Net 2008) how I can select all thumbnails in ThumbnailViewer control and delete them (at first DoSelectAll, then DoDelete) by pressing a single button??

Thank you very much!!!!

Alex
Site Admin
Posts: 1474
Joined: Thu Jul 10, 2008 2:21 pm

Re: VB.net sample code for DoDelete and DoSelectAll

Post by Alex » Fri Aug 12, 2011 12:45 pm

Hello,

Here is a snippet of code:

Code: Select all

thumbnailViewer1.Images.Clear()
Best regards, Alexander

communi
Posts: 12
Joined: Wed Jul 13, 2011 11:07 pm

Re: VB.net sample code for DoDelete and DoSelectAll

Post by communi » Fri Aug 12, 2011 4:55 pm

Hi Alex,

thank you, but this does'nt work, I tried this already. The thumbnails are away from thumbnailviewer, but the files are still locked on harddisk and cannot be deleted :-( If I select all by pressing the shortcut and delete them by shortcut(pressing DEL) the files are no longer locked by the application and can be deleted. That the reason, why I need sample code for the DoDelete method. Or is there an another way to release the files from the thumbnailviewer so they can be deleted on the harddisk?

Thank you!!

Kai

Alex
Site Admin
Posts: 1474
Joined: Thu Jul 10, 2008 2:21 pm

Re: VB.net sample code for DoDelete and DoSelectAll

Post by Alex » Fri Aug 12, 2011 6:45 pm

Hello Kai,

Previous code clears the collection but does not dispose the items (VintasoftImage objects) of the collection.

You need to use this code if you want clear the collection and dispose items of the collection:

Code: Select all

thumbnailViewer1.Images.ClearAndDisposeItems()
Please read about the ImageCollection and ThumbnailViewer classes in the documentation.

Best regards, Alexander

communi
Posts: 12
Joined: Wed Jul 13, 2011 11:07 pm

Re: VB.net sample code for DoDelete and DoSelectAll

Post by communi » Sat Aug 13, 2011 3:54 pm

Hi Alex,

I tried also ClearAndDisposeItems before I posted here, but no luck, all images are locked on the harddisk until I close the application :-( I read the documentation several times, thats how I found the DoDelete and DoSelectAll methods, but I need some short sample code for this, because this seems the only way to delete the files from harddisk. Do you have a short sample for this both? As I said - if I would use the shortcuts in the ThumbnailViewer to select all and delete everything is fine and the files are no longer locked on the harddisk, so I must find a way to do this both actions by pressing a button.

Kai

Alex
Site Admin
Posts: 1474
Joined: Thu Jul 10, 2008 2:21 pm

Re: VB.net sample code for DoDelete and DoSelectAll

Post by Alex » Sun Aug 14, 2011 7:42 am

Hello Kai,

Please send your application or demo application which demonstrates your problem to support@vintasoft.com - we need reproduce the problem, I think you have a mistake in your code.

Best regadrs, Alexander

Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests