Wednesday, January 7, 2015

Visual Basic - Creating a Stop watch

  • Before you begin here make sure you have checked previous tutorials on vb.
     Making a Stop watch in Visual Basic is quite simple, all you have to do is to follow this basic steps.
Step 1: Launch your Visual studio or Visual Basic 2010 application.
Step 2: Click on "New Project" and Rename your project as Stop Watch Application.
Step 3: After the form as been loaded, add the following from the tools box;

  •    add labels 4,label 5 and label 6 with front size 50 and front LED and rename as "00".
  •    add label 9 with font LED and font size 15 and also rename as "00".
  • add 3 buttons and rename them as Start, Stop and Reset respectively.
  • add button 4 and name as Exit
  • add another label and name as "Current time" and label 8 as "HH" with font Algerian
  • add labels above and rename as "hh" , "mm" and "ss".
  • Add two timers 1 and 2. Timer 1should have a "10" interval while timer 2 should be "100"
  • The end product should look like the image below.
     
      Move to the programming section and insert the code below:
or you can click on each of the elements on the design section and insert the code below them.
Your output after running should be like this:

No comments:

Post a Comment