Tutorials Navigation

Tutorials :: New :: Popular :: Top Rated

Tutorials: 18,357 Categories: 12

Total Tutorial Views: 42,405,415

[VB.NET] How to Make a Counter Using a Label

Tutorial Name: [VB.NET] How to Make a Counter Using a Label  

Category: PC Tutorials

Submitted By: Maj

Date Added:

Comments: 2

Views: 3,723

Related Forum: PC Building Forum

Share:

Ever wanted to make a timer display how many times the user has performed a certain action? Well here's how its done!




For this example I will be counting the number of times a button is clicked, however you can use anything! Such as timer ticks

Step 1. Make a new form with 2 labels and 1 button, like shown below

[ Register or Signin to view external links. ]


Step 2. Make note of the label name is for the value for me its Label 2

Step 3. Double click your button (or any other action) and insert the following code

Label2.text = val(label2.text) + 1


It should look something like this

[ Register or Signin to view external links. ]


Step 4. Test out your application by debugging it!




Simple right? Just like that you can count how many times an action has been performed

Ratings

Current rating: 1.75 by 4 users
Please take one second and rate this tutorial...

Not a Chance
1
2
3
4
5
6
7
8
9
10
Absolutely

Comments

"[VB.NET] How to Make a Counter Using a Label" :: Login/Create an Account :: 2 comments

If you would like to post a comment please signin to your account or register for an account.

HaloPosted:

Pretty detailed guide man, I like it.

ZydrinPosted:

Very handy, will def try getting into this! :)