By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,955 Members | 1,756 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,955 IT Pros & Developers. It's quick & easy.

Locked up Download

P: n/a
I use the following code

My.Computer.Network.DownloadFile(file.Text, "C:\Program Files\Mystic Galaxies\

Mystic Galaxies Aqua\Downloads\" & title.Text & ".mp3")

and it downloads the file, but freezes the application. Why is it doing this?

Apr 22 '07 #1
Share this Question
Share on Google+
1 Reply


P: n/a
meoblast001 <u33565@uwewrote:
I use the following code

My.Computer.Network.DownloadFile(file.Text, "C:\Program Files\Mystic Galaxies\

Mystic Galaxies Aqua\Downloads\" & title.Text & ".mp3")

and it downloads the file, but freezes the application. Why is it doing this?
You're doing the download in the UI thread. You should use a background
worker thread to do the download. Note that you won't be able to access
the Text property of your textfields within that thread.

See http://pobox.com/~skeet/csharp/threads/winforms.shtml for more
info.

--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet Blog: http://www.msmvps.com/jon.skeet
If replying to the group, please do not mail me too
Apr 22 '07 #2

This discussion thread is closed

Replies have been disabled for this discussion.