# Progress bar in C# windows application



## dampyr (Nov 25, 2011)

Hello,

i have batch file (142 lines total) syntax is similar to this:


copy something somewhere

start /min excel.xls
start /min excel1.xls
start /min excel2.xls
start /min excel2.xls

-----------------------

and so on

I have created c# Windows form with button which runs batch-all that's fine.However,i want to implement progress bar,which will read thru the bat file once to get the total number of commands in the bat file. 
Set the progress bar max value to this value. 
Re-read thru the batch file, and after every command is complete, increment the progress bar value by 1


I found Visual Basic code for this,but i would like C# code either.

Thanks in advance.


----------



## ckphilli (Apr 29, 2006)

here's a converter: http://www.codechanger.com/


----------

