473,387 Members | 1,455 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

webclient freezes application

ddd
Hi,

I am trying to use webclient to download a file from a windows application
and I notice that the application freezes while the file downloads. The file
is about 300k so it takes a few seconds for it to download.

Is there anyway to download the file on the background so the user can still
use the application while its downloading the file?

thanks
Nov 21 '05 #1
3 2420
ddd,

This is in my opinion the best sample where MultiThreading is real
effective, there cannot be any doubt about that.

I hope this helps?

Cor

I am trying to use webclient to download a file from a windows application
and I notice that the application freezes while the file downloads. The file is about 300k so it takes a few seconds for it to download.

Is there anyway to download the file on the background so the user can still use the application while its downloading the file?

thanks

Nov 21 '05 #2
* =?Utf-8?B?ZGRk?= <dd*@discussions.microsoft.com> scripsit:
I am trying to use webclient to download a file from a windows application
and I notice that the application freezes while the file downloads. The file
is about 300k so it takes a few seconds for it to download.

Is there anyway to download the file on the background so the user can still
use the application while its downloading the file?


Yes, in a background thread.

Multithreading:

<URL:http://msdn.microsoft.com/library/en-us/dnforms/html/winforms06112002.asp>
<URL:http://msdn.microsoft.com/library/en-us/dnforms/html/winforms08162002.asp>
<URL:http://msdn.microsoft.com/library/en-us/dnforms/html/winforms01232003.asp>

<URL:http://www.devx.com/dotnet/Article/11358/>

<URL:http://msdn.microsoft.com/library/en-us/cpref/html/frlrfSystemWindowsFormsControlClassInvokeTopic.asp >

Multithreading in Visual Basic .NET (Visual Basic Language Concepts)
<URL:http://msdn.microsoft.com/library/en-us/vbcn7/html/vaconthreadinginvisualbasic.asp>

--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>
Nov 21 '05 #3
However I am not sure if I need to specify background thread or not.


When you do not abort it in the closing of your main thread you can do that,
I do not see any reason in your occassion why not by the way..

Cor
Nov 21 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

11
by: ptass | last post by:
Hi I've installed win2k3 sp1 on a machine where an openRead on any given file was previously working. After installation, I get a webException as follows... ..message "An exception occurred...
1
by: Sven Putze | last post by:
my target: I want to upload a file via HTTP Post and show the user a progress bar my 1st try: I´ve used WebClient.UploadFile and WebClient.UploadData, they work fine but I don't know any...
6
by: genc ymeri | last post by:
Hi, We are struggeling to upload a file through a C# webClient into JBoss web server. Meanwhile we are able to upload a file from the webserver itself. The problem is only with C# webClient . The...
6
by: A.M-SG | last post by:
Hi, I have an aspx page at the web server that provides PDF documents for smart client applications. Here is the code in aspx page that defines content type: Response.ContentType =...
2
by: Rags | last post by:
Hi We are creating a web application using .NET which renders some reports. The reports are created in MS Reporting Services and can be accessed by typing in a URL with the required parameters...
0
by: Kumar | last post by:
Hi all, I have the following code which uses WebClient.UploadValues myNameValueCollection.Add("Name", name) myNameValueCollection.Add("Age", age) .............. ............. Dim web As New...
3
by: Manuel | last post by:
I have an asp page ("test.asp") that presents the data it receives from a post.When I try the following code, test.asp doesn't return the values (supposedly) posted to it. If I make a web page with...
8
by: DEWright_CA | last post by:
Why does WebClient.DownloadFile loose my completed path? Ok, I have a function in my app then when my button is clicked it checks to see if the files come from a local drive or a http address....
1
by: Jules Winfield | last post by:
I've build a client-server application in which the client communicates with the server by making calls to WebClient.UploadValuesAsync(). In a given client session, hundreds of calls will be made...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.