Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 783
  • Last Modified:

VB.NET Report Progress on StreamWriter write

Hi,

I have sucessfully implemented the backgroundworker / report progress on a number of tasks by updating the report progress within a loop.

However, when I am writing to a text file from a Rich Text Box, I cannot report progress because I am not looping through the records (because this takes too long).

Instead I am using the following code:

Dim objwriter As New StreamWriter(Filename)

objwriter.Write(RichTextBox1.Text)

Open in new window


How do I report progress without going through a loop and writing line by line?
0
mondintator
Asked:
mondintator
1 Solution
 
Luis PérezSoftware Architect in .NetCommented:
0
 
Mike TomlinsonMiddle School Assistant TeacherCommented:
Since you're not looping and the Write() method doesn't report any feedback, you can't.

You can change the cursor to an hourglass or display an animated gif so the user knows something is happening.
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now