Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Programming Talk / Delphi - Download file from HTTP help..

Author
Message
Sergey K
21
Years of Service
User Offline
Joined: 4th Jan 2004
Location:
Posted: 14th Jan 2006 16:25
hey all, im building launcher/updater for my game, and i wondering, how to i downloading file from http web site without freezing the application? so if i will find the way how to make the download witout freezing the application, i can make a download progress bar - and thats the main idea what im trying to do while downloading..

i have tryed to incluse "urlmon" and use the UrlDownloadToFile - but that command is freezing the program until the file will be downloaded.

and i also tryed to use uAdvHttp - but that one can download files that uncoded(text files,html files etc.) but not images/zips etc.


so all what i need, is to find how to download a file with progress bar.

Just. ...Leave me alone =/
hyrichter
21
Years of Service
User Offline
Joined: 15th Feb 2004
Location: Arizona
Posted: 15th Jan 2006 03:09 Edited at: 15th Jan 2006 03:10
You probably have to create a multi-threaded program. However, that's something I don't know much about. I have some examples of it in a book, but have never bothered to learn about it yet.

Edit: Try putting some application.ProcessMessages; commands in there. It's basically the equivalent of Do Events() in VB.

Sergey K
21
Years of Service
User Offline
Joined: 4th Jan 2004
Location:
Posted: 15th Jan 2006 13:40 Edited at: 15th Jan 2006 13:43
@hyrichter: thx, but i already did it using AdvHttp(wininet) component.. and it works fine!

take a look at the launcher's shot i made(MY 1ST DELPHI's APP!!)



Just. ...Leave me alone =/

Attachments

Login to view attachments

Login to post a reply

Server time is: 2025-05-18 15:22:36
Your offset time is: 2025-05-18 15:22:36