Welcome Little Programmer
I will show you how to create a simple stopwatch for visual basic 6 beginners. This stopwatch consists of 3 labels called Label1, Label2, Label3 and 2 buttons called btnSart and btnExit.
1. Create 3 labels named Label1, Label2 and Label3.
2. Change the text of these labels to the number 0.
3. Create a Start/Stop button called btnStart.
4. Create an Exit button called btnExit.
5. Finally, create a timer called tmrTime. Make sure you change the timer interval to 1000 to represent 1 second. This can be placed anywhere in the form as it does not interfere with the design/object.
Then we start our coding. As long as you have labelled everything correctly, you can simple just type all this in without going back and referring to each component.
We will first code the button Start/Stop. This code means if the timer doesnt start automatically, this starts it.
Thanks for viewing this tutorial.
Resource Program Here
0 comments:
Post a Comment