473,406 Members | 2,217 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,406 software developers and data experts.

Vb.net application - progress update screen

I have simple vb application that loops through a list of filename and
perform a System.IO.File.Copy from one server to another. I have a
readonly textbox where I append messages showing what's going on. ie.

Processing ..
Copy \\Server1\file1 to \\Server2\file1 ... Done
Copy \\Server1\file2 to \\Server2\file2 ...

The copy process is slow for each file copy and the TextBox doesn't
show the messages until the whole program finished running. Is there a
way to make the TextBox render the partial result for each copying?

Apr 19 '07 #1
3 11985
In your loop that is copying files, try calling the Refresh method of the
TextBox.

TextBox.AppendText("Processing .." & vbcrlf)

For Each oFile as File in MyListOfFiles

TextBox.AppendText("I'm coping stuff ... ")
TextBox.Refresh

oFile.Copy ...

TextBox.AppendText("Done" & vbcrlf)

Next

Or move your file copying to a seperate thread.

<te***@yahoo.comwrote in message
news:11**********************@o5g2000hsb.googlegro ups.com...
>I have simple vb application that loops through a list of filename and
perform a System.IO.File.Copy from one server to another. I have a
readonly textbox where I append messages showing what's going on. ie.

Processing ..
Copy \\Server1\file1 to \\Server2\file1 ... Done
Copy \\Server1\file2 to \\Server2\file2 ...

The copy process is slow for each file copy and the TextBox doesn't
show the messages until the whole program finished running. Is there a
way to make the TextBox render the partial result for each copying?

Apr 19 '07 #2
On Apr 19, 1:57 pm, t...@yahoo.com wrote:
I have simple vb application that loops through a list of filename and
perform a System.IO.File.Copy from one server to another. I have a
readonly textbox where I append messages showing what's going on. ie.

Processing ..
Copy \\Server1\file1 to \\Server2\file1 ... Done
Copy \\Server1\file2 to \\Server2\file2 ...

The copy process is slow for each file copy and the TextBox doesn't
show the messages until the whole program finished running. Is there a
way to make the TextBox render the partial result for each copying?
To ensure that screen updates are reflected as soon as possible, put
an:

Application.DoEvents

inside the copy loop.

Apr 19 '07 #3
Great. Application.DoEvents did just fine. I haven't tried the
TextBox.Refresh method but thanks too.

Apr 19 '07 #4

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

Similar topics

3
by: Nick | last post by:
Hi, I would like to make my application to automatically check on updates from a source and if any, downloads it and automatically updates itself with the new version. Now because the...
4
by: Matthew Crouch | last post by:
As noted before, I'm not a JS programmer, but I ought to be able to get a couple simple things done with it and now I've spent two weeks on them. Main reasons: - seems like JS is all-or-nothing....
0
by: Saso Zagoranski | last post by:
Hi! I've started to use the MS AutoUpdater AppBlock in my Application. I found a solution on how to do it here: http://dotnetjunkies.com/WebLog/bsblog/archive/2004/06/10/16118.aspx I have...
5
by: hb | last post by:
Hi, In my ASP.Net application 'MyWebApp' , the mode="StateServer" in <sessionState> of Web.config file, and the ASP.NET State Service is set to start automatically on the server. But every...
0
by: Casey Bralla | last post by:
My problem was caused by a getch() function which paused, waiting for the character. Live and learn. <sigh> For some reason, I can't get curses to refresh the screen. Can someone offer a...
3
by: WB | last post by:
Hi, I'm building my first Windows application using C#. My Windows application sends newsletter to our subscribers by email. Our newsletter is sort of "customized" so my application has to...
2
by: Johann Schuler | last post by:
I'm learning C#. I want to direct a console application's output to a screen where I can select and copy some of the text. How do I do this? Many thanks!
4
by: Mark Siler | last post by:
First let me say I'm not a developer. I'm looking for someone that can either do this for me or point me to a technology that can. I'm in need of a way via the Internet to push a screen or webpage...
1
by: kumarbhupe | last post by:
How can I change the size of the forms in my Windows application when the screen resolution the user has is higher than the one I developed the application in? I have a customer that has a screen...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.