BackgroundWorker: Thumbnail Viewer

Please post bug reports, feature requests, or any question regarding the DELPHI AREA products here.

BackgroundWorker: Thumbnail Viewer

Postby Kambiz » December 7th, 2008, 8:42 pm

In the last week I received some email and there was also some discussions in the forum regarding TBackgroundWorker component.

To clear the issue, I have written another sample program to show how to use BackgroundWorker component to pass strings and objects from the worker thread to the main VCL thread.

In this sample, no synchronization is involved and the worker thread never waits for the main VCL thread. In this way a worker thread can do the time consuming tasks smoothly, and other threads (including the main thread) can not interrupt or slow down it.

This sample is a thumbnail viewer. After selecting an image folder, the background worker thread does the following tasks:

  • Searches for image files in the folder
  • Creates thumbnail of each image
  • Sends filename and thumbnail (Bitmap) of each image to the main VCL thread to be displayed on a listbox
Attachments
thumbnail-viewer.zip
A thumbnail viewer using TBackgroundWorker component
(4.08 KiB) Downloaded 316 times
Kambiz
User avatar
Kambiz
Administrator
Administrator
 
Posts: 2408
Joined: March 7th, 2003, 7:10 pm

Re: BackgroundWorker: Thumbnail Viewer

Postby smrwsmrw » December 12th, 2008, 5:21 pm

thank you, Kambiz
smrwsmrw
Member
Member
 
Posts: 4
Joined: August 27th, 2008, 12:00 am


Return to DELPHI AREA Products

Who is online

Users browsing this forum: No registered users and 1 guest

cron