If you post this on another forum remember to give credits.
Hello, in this tutorial i will show you how to make a progress bar in delphi.
What you will need:
1 progress bar
1 timer
1 button
Okay, first lets add the progress bar which can be found here:
Next lets add the timer which is here:
And finally lets add in the button:
Your program should now look similar to this:
Now time for the coding. Double click your timer1 and type in the following code:
Now click your button1 and type in this:
Now click your timer and look on the left hand side and click the drop down menu next to enabled and click false.
And your done if you run your program by pressing the triangle here:
or by pressing F9 , when you click your button1 it should start counting up the progressbar.
Hope you enjoyed my tutorial
Hello, in this tutorial i will show you how to make a progress bar in delphi.
What you will need:
1 progress bar
1 timer
1 button
Okay, first lets add the progress bar which can be found here:
Next lets add the timer which is here:
And finally lets add in the button:
Your program should now look similar to this:
Now time for the coding. Double click your timer1 and type in the following code:
Code:
progressbar1.Position := progressbar1.Position+2; //you may change the value of 2
if progressbar1.Position=100 then // you may also change the 100 value to anything you want
timer1.enabled := false;
//You may add your choice of code here messagebox etc.
Now click your button1 and type in this:
Code:
timer1.enabled :=true
Now click your timer and look on the left hand side and click the drop down menu next to enabled and click false.
And your done if you run your program by pressing the triangle here:
or by pressing F9 , when you click your button1 it should start counting up the progressbar.
Hope you enjoyed my tutorial