I am brand new to this, I started last night to be exact and I'm done with my NotePad that I made, but I want to add a progress bar so that when people open Big files such as .doc or other text files, then the bar will display how far it has opened.
I am using C#
I assume you use TextBox class, and you load a text file using, for example, System.IO.File.ReadAllText(string); Or maybe you use RichTextBox with LoadFile() method?
This way or another I see there are 2 possible solutions. Neither is easy or handy.
1. Make a method that reads the file buffer-after-buffer in a while loop. Inside the loop you can also update the progressbar.
2. You could put that File.ReadAllText() method into a 2nd thread, and set progressbar.Style to Marquee. After the method ended, you stop the progressbar.
Is this any help? I imagine it is not...![]()
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks