Click here to Skip to main content
15,925,309 members
Home / Discussions / C#
   

C#

 
GeneralRe: bitmap with scroll Pin
Syed Abdul Khader19-Mar-04 22:10
Syed Abdul Khader19-Mar-04 22:10 
GeneralApplication Updater on Apache Pin
bisquic19-Mar-04 6:15
bisquic19-Mar-04 6:15 
GeneralRe: Application Updater on Apache Pin
Heath Stewart19-Mar-04 6:25
protectorHeath Stewart19-Mar-04 6:25 
GeneralRe: Application Updater on Apache Pin
bisquic22-Mar-04 3:03
bisquic22-Mar-04 3:03 
Generaladd reference Pin
yyf19-Mar-04 6:08
yyf19-Mar-04 6:08 
GeneralRe: add reference Pin
Heath Stewart19-Mar-04 6:13
protectorHeath Stewart19-Mar-04 6:13 
GeneralFile segmentation Pin
profoundwhispers19-Mar-04 5:47
profoundwhispers19-Mar-04 5:47 
GeneralRe: File segmentation Pin
Heath Stewart19-Mar-04 6:09
protectorHeath Stewart19-Mar-04 6:09 
See the HttpWebRequest.AddRange method documentation in the .NET Framework SDK, which includes an example. The HTTP Range header specifies which byte range you want to get. See RFC 2616, Section 14, Subsection 35[^] for more information on the Range header.

This is assuming that the HTTP daemon supports it. This is only supported in HTTP/1.1. Be sure to catch exceptions when it's not supported, though the server will most likely just hand you the entire file without complaining on a single request.

For multi-threading, I recommend asynchronous calls (see HttpWebRequest.BeginGetResponse) as opposed to handling threads yourself. You can implement a ProgressBar by using HttpWebResponse.GetResponseStream and reading and writing the bytes to a file (in that loop is where you'd increment your progress bar).

 

Microsoft MVP, Visual C#
My Articles
GeneralSomething unclear to me about threads... Pin
profoundwhispers19-Mar-04 5:43
profoundwhispers19-Mar-04 5:43 
GeneralRe: Something unclear to me about threads... Pin
Heath Stewart19-Mar-04 6:01
protectorHeath Stewart19-Mar-04 6:01 
GeneralStrong/Shared assemblies Pin
Kant19-Mar-04 4:57
Kant19-Mar-04 4:57 
GeneralRe: Strong/Shared assemblies Pin
Heath Stewart19-Mar-04 5:59
protectorHeath Stewart19-Mar-04 5:59 
GeneralRe: Strong/Shared assemblies Pin
Kant19-Mar-04 10:36
Kant19-Mar-04 10:36 
GeneralRe: Strong/Shared assemblies Pin
Heath Stewart21-Mar-04 12:52
protectorHeath Stewart21-Mar-04 12:52 
GeneralLoading assemblies Pin
Craig G. Wilson19-Mar-04 4:55
Craig G. Wilson19-Mar-04 4:55 
GeneralRe: Loading assemblies Pin
Heath Stewart19-Mar-04 5:56
protectorHeath Stewart19-Mar-04 5:56 
GeneralRe: Loading assemblies Pin
Craig G. Wilson19-Mar-04 8:03
Craig G. Wilson19-Mar-04 8:03 
GeneralRe: Loading assemblies Pin
Craig G. Wilson19-Mar-04 8:34
Craig G. Wilson19-Mar-04 8:34 
GeneralRe: Loading assemblies Pin
Heath Stewart21-Mar-04 12:36
protectorHeath Stewart21-Mar-04 12:36 
Generalcombobox databinding from webservice in mobile application Pin
Littlefool19-Mar-04 2:43
Littlefool19-Mar-04 2:43 
GeneralCreating virtual File Item in C# Pin
Tristan Rhodes19-Mar-04 2:17
Tristan Rhodes19-Mar-04 2:17 
GeneralRe: Creating virtual File Item in C# Pin
Heath Stewart19-Mar-04 4:34
protectorHeath Stewart19-Mar-04 4:34 
GeneralRe: Creating virtual File Item in C# Pin
Tristan Rhodes19-Mar-04 6:04
Tristan Rhodes19-Mar-04 6:04 
GeneralRe: Creating virtual File Item in C# Pin
Heath Stewart19-Mar-04 6:19
protectorHeath Stewart19-Mar-04 6:19 
GeneralRe: Creating virtual File Item in C# Pin
Tristan Rhodes19-Mar-04 8:15
Tristan Rhodes19-Mar-04 8:15 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.