i searched for code to download files with vb.net...i came out with this:


string remoteUri = "http://www.contoso.com/library/homepage/images/";
string fileName = "ms-banner.gif", myStringWebResource = null;
// Create a new WebClient instance.
WebClient myWebClient = new WebClient();
// Concatenate the domain with the Web resource filename.
myStringWebResource = remoteUri + fileName;
listBox1.Items.Add("Downloading File "+fileName.ToString()+" from "+myStringWebResource.ToString()+" ....");
// Download the Web resource and save it into the current filesystem folder.
myWebClient.DownloadFile(myStringWebResource,fileName);
listBox1.Items.Add("Successfully Downloaded File "+fileName.ToString() +" from "+myStringWebResource.ToString());
listBox1.Items.Add("Downloaded file saved in the following file system folder:");
listBox1.Items.Add(Application.StartupPath.ToString() );


it's in C#, but no problem, i can turn it into VB easyly...the problem is that the program freezes while downloading...how do i download files without the all program freezes while downloading...?