c# - StopWatch to Show Counter of Elapsed Time? -
i have textbox on windows form wanting show elapsed time procedure has taken, not seeing time counting in textbox. below code
public partial class form1 : system.windows.forms.form { private stopwatch watch = new stopwatch()l private void btn_rashadsl() { watch.start(); //lots of code here typically takes around 15 - 20 minutes complete } private void timer_tick(object sender, eventargs e) { textbox1.text = watch.elapsed.seconds.tostring(); } }
given code have posted i'd problem @ no point have set timer call timer_tick
method.
Comments
Post a Comment