Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How do they do that!!!????

Status
Not open for further replies.

memevertical2

Programmer
May 2, 2008
35
Hi, there is a software that displays items on a Grid. The first field is a picture, and there is another field that is the picture's URL, and when I enter the URL for everything, the images start to appear one by one....and the next time I open the app, they start to appear 1 by 1 again.

I need to do something like this, and I came up with an option:

Downloading the images to a folder, 1 by 1, and I know how to do this but the problem is that I dont know how to do it in the background, without freezing the app.

any thoughts?

Thanks everyone....
 
You'll need to create a separate thread that loads an image and signals the parent thread when done. The parent can then stick the image in the grid and instruct the child thread to load another image. When you are finished loading images, terminate the child threads.

You don't have to limit yourself to just one spawned thread.

Hope this helps.
 
threads are complicated, and you're likely to have all sorts of problems if this is the first time you're going to use them. Have a search in the FAQ and this forum for thread-related topics to give yourself as much info as possible before trying to tackle them.

The Delphi help (in D6 at least) has a good intro to using threads, and there's an excellent thread demo in the Demos folder that does 3 different sorts at once.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top