Shadow Blade
Morrowland Presents Apron Tutorials
game - design - multimedia - web - programming - tutorials - There are currently viewers visiting Apron Tutorials.
   
 
TECHNICAL
GRAPHICAL
SOUND
GAME
WEB
ARTICLE
TOOL
PROJECT
 
 NEWS

  news

  history


 TECHNICAL TUTORIALS

  opengl

  direct3d

  c/c++

  visual basic

  java

  c#


 WEB TUTORIALS

  html

  dhtml

  asp

  php


 IMAGE EDITING

  photoshop

  draw sketch


 3D MODELING

  3d studio


 PROJECTS

  shadow blade

  game environment

  virtual 3d guide

  billy blue flame


 DEMOS

  win32 api


 ARTICLES

  general

  opengl


 COMMUNITY

  about us

  credit

  contact







VISUAL BASIC .NET APRON TUTORIALS





'Timers are the backbone in any good application,
'you will be able to decide when things will happen in millisecounds
'by using timers and counters you gain control

Public Class Form1
    Inherits System.Windows.Forms.Form

    'declare counter as integer
    Dim counter As Integer

    Private Sub Form1_Load(ByVal sender As System.Object, _
    ByVal e As System.EventArgs) Handles MyBase.Load
        Timer1.Enabled = False 'disable timer at startup
    End Sub

    Private Sub Button1_Click(ByVal sender As System.Object, _
    ByVal e As System.EventArgs) Handles Button1.Click
        Timer1.Enabled = True   'starts the timer by enabling it
    End Sub

    Private Sub Button3_Click(ByVal sender As System.Object, _
    ByVal e As System.EventArgs) Handles Button3.Click
        Timer1.Enabled = False  'stops the timer by disabling it
    End Sub

    Private Sub Button2_Click(ByVal sender As System.Object, _
    ByVal e As System.EventArgs) Handles Button2.Click
        counter = 0             'reset the counter
        TextBox1.Text = 0
    End Sub

    'The timer procedure
    'the timer procedure will loop in the intervall of the timer
    'I have set the timer interval in the "properties" menu to 1000 ms (1 sec)
    Private Sub Timer1_Tick(ByVal sender As System.Object, _
    ByVal e As System.EventArgs) Handles Timer1.Tick
        counter = counter + 1   'we set the counter to count here
        TextBox1.Text = counter    'write the counter value out as text
    End Sub

End Class


Download The Source Code! Visual Basic .Net Source Code


I hope you found this VB .Net tutorial useful!

Don't forget to mention Apron Tutorials in your References!

Best Regards
Ronny André Reierstad

 LINKS

  morrowland home



 GAME DEVELOPEMENT

  nvidia

  gamedev

  polycount


 PROJECTS

  shadow blade

  game environment

  virtual 3d guide

  billy blue flame


 MATH AND PHYSICS

  mathworld

  physicsworld







PLEASE LINK TO


  All rights reserved Morrowland © 2011  
Ronny André Reierstad