+ 1

I made a progress bar with win forms and then a message box. l have coded the progress bar to run and also the message box but when l run the progress bar the message box also runs same time, l want the progress bar to to go until 100% then the message box to pop,

Progress bar and message box

17th Jun 2016, 7:48 PM
Oneil
Oneil - avatar
7 odpowiedzi
+ 2
try this, tell me if this will work or not. -- if (progressbar.Value == 100) { MessageBox.Show("Completed!"); timer.Enabled = false; }
17th Jun 2016, 8:55 PM
erwinmesi
erwinmesi - avatar
+ 1
if (progressbar.Value == 100) { MessageBox.Show("Completed!"); } -- Hope that answers your question.
17th Jun 2016, 7:59 PM
erwinmesi
erwinmesi - avatar
0
l tried that code but still the message box pops up when progress bar starts running
17th Jun 2016, 8:24 PM
Oneil
Oneil - avatar
0
uhmm, did you use a timer?
17th Jun 2016, 8:27 PM
erwinmesi
erwinmesi - avatar
0
Yeah l did, set it to maximum of 100
17th Jun 2016, 8:52 PM
Oneil
Oneil - avatar
0
Works perfectly :) Thanks buddy!
17th Jun 2016, 9:00 PM
Oneil
Oneil - avatar
0
Any time :)
17th Jun 2016, 9:04 PM
erwinmesi
erwinmesi - avatar