Click here to Skip to main content
16,004,919 members
Home / Discussions / Visual Basic
   

Visual Basic

 
QuestionStrings Pin
Cedrickdeorange2-Dec-06 1:12
Cedrickdeorange2-Dec-06 1:12 
AnswerRe: Strings Pin
mr_lasseter2-Dec-06 4:57
mr_lasseter2-Dec-06 4:57 
AnswerRe: Strings Pin
Taylor Kobani4-Dec-06 1:10
Taylor Kobani4-Dec-06 1:10 
AnswerRe: Strings Pin
Nouvand8-Dec-06 2:15
Nouvand8-Dec-06 2:15 
QuestionProblem with Progress Bar Pin
pathak781-Dec-06 19:49
pathak781-Dec-06 19:49 
AnswerRe: Problem with Progress Bar Pin
mr_lasseter2-Dec-06 4:55
mr_lasseter2-Dec-06 4:55 
AnswerRe: Problem with Progress Bar Pin
Taylor Kobani2-Dec-06 23:57
Taylor Kobani2-Dec-06 23:57 
AnswerRe: Problem with Progress Bar Pin
Dave Kreskowiak3-Dec-06 4:20
mveDave Kreskowiak3-Dec-06 4:20 
Well, you've got a bit of a problem. Just putting a ProgressBar on a form doesn't do anything. You have to update it with, well, progress.

If you're using the File.Copy method, you'll never get that progress. It's a blocking call that doesn't report anything during the copy.

In order to make a progress bar work, you have to copy the file yourself using file stream methods. You know...open a file read some of it, write that to another file. Well, that's where you update the ProgressBar.

You get the size of the file first, start copying the file, track how much of the file you've copied and update the ProgressBar as you're copying the file.

Like the others have said, you can even move the copy operation to another thread so your UI stays responsive.


Dave Kreskowiak
Microsoft MVP - Visual Basic


QuestionGmail integration in VB.net Pin
Brent Stringer1-Dec-06 18:27
Brent Stringer1-Dec-06 18:27 
AnswerRe: Gmail integration in VB.net Pin
Thomas Stockwell2-Dec-06 9:28
professionalThomas Stockwell2-Dec-06 9:28 
QuestionHow to reteive a table name in a database Pin
vincentkhoosiongleng1-Dec-06 15:17
vincentkhoosiongleng1-Dec-06 15:17 
AnswerRe: How to reteive a table name in a database Pin
Bassam Saoud2-Dec-06 1:35
Bassam Saoud2-Dec-06 1:35 
Questionbuilding desktop applicatin that aligns on top of desktop Pin
DEVILSAN1-Dec-06 13:52
DEVILSAN1-Dec-06 13:52 
AnswerRe: building desktop applicatin that aligns on top of desktop Pin
Are Jay2-Dec-06 16:35
Are Jay2-Dec-06 16:35 
QuestionWebClient.DownloadString() after POSTING data Pin
spelltwister1-Dec-06 13:47
spelltwister1-Dec-06 13:47 
Question[Message Deleted] Pin
alexrad1-Dec-06 12:56
alexrad1-Dec-06 12:56 
AnswerRe: EVENTS PROBLEM Pin
Dave Kreskowiak1-Dec-06 13:02
mveDave Kreskowiak1-Dec-06 13:02 
GeneralRe: EVENTS PROBLEM Pin
alexrad1-Dec-06 13:06
alexrad1-Dec-06 13:06 
GeneralRe: EVENTS PROBLEM Pin
Dave Kreskowiak1-Dec-06 13:21
mveDave Kreskowiak1-Dec-06 13:21 
GeneralRe: EVENTS PROBLEM Pin
alexrad1-Dec-06 13:25
alexrad1-Dec-06 13:25 
AnswerRe: EVENTS PROBLEM Pin
Dave Kreskowiak1-Dec-06 13:23
mveDave Kreskowiak1-Dec-06 13:23 
GeneralRe: EVENTS PROBLEM Pin
alexrad1-Dec-06 13:32
alexrad1-Dec-06 13:32 
QuestionWithin Application Hook? Pin
dslamb1-Dec-06 9:46
dslamb1-Dec-06 9:46 
AnswerRe: Within Application Hook? Pin
Dave Kreskowiak1-Dec-06 10:20
mveDave Kreskowiak1-Dec-06 10:20 
QuestionTrial Software Pin
andyr20051-Dec-06 7:07
andyr20051-Dec-06 7:07 

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.