progressBar
-
HI I have written a function(ReadByte)that read a file in class library. and make a add refrence to window application. i place a button control and a progressBar on the form and at the button click event i call ReadByte function now i want that progressBar should be progressed as file is reading . How can i do this
-
HI I have written a function(ReadByte)that read a file in class library. and make a add refrence to window application. i place a button control and a progressBar on the form and at the button click event i call ReadByte function now i want that progressBar should be progressed as file is reading . How can i do this
If you're reading one byte at a time, your progress bar will work, at the cost of the operation being slow. You can call Application.DoEvents to make your form repaint, or put the byte reading code in another thread to your UI.
Christian Graus - Microsoft MVP - C++ Metal Musings - Rex and my new metal blog
-
If you're reading one byte at a time, your progress bar will work, at the cost of the operation being slow. You can call Application.DoEvents to make your form repaint, or put the byte reading code in another thread to your UI.
Christian Graus - Microsoft MVP - C++ Metal Musings - Rex and my new metal blog
sir i want to know how the progress bar will progress while it is in window appl. how can i kow how many bytes are read. is there any ParameterizedThread function or like this in c#1.1
-
sir i want to know how the progress bar will progress while it is in window appl. how can i kow how many bytes are read. is there any ParameterizedThread function or like this in c#1.1
i think the easy way is fire event from reading loop and catch in the progressbar form and change the indicator according to that. i customised the EventArgs with TotBytes and TotRead. it is working for me. good luck
Where there is a will,there is a way.
-
i think the easy way is fire event from reading loop and catch in the progressbar form and change the indicator according to that. i customised the EventArgs with TotBytes and TotRead. it is working for me. good luck
Where there is a will,there is a way.
that is the problem how can i read loop in class library that notify me what is the status
-
that is the problem how can i read loop in class library that notify me what is the status
You can create a delegate which calls out of the class library on every iteration.
Christian Graus - Microsoft MVP - C++ Metal Musings - Rex and my new metal blog