Advertisement
Kimeraweb

Untitled

Sep 21st, 2012
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Public Class Form1
  2.     Dim onOff As Integer
  3.  
  4.     Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
  5.         Button1.Text = Date.Now
  6.     End Sub
  7.  
  8.     Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
  9.         Timer1.Interval = 1000
  10.         onOff += 1
  11.         If Not (onOff Mod 2 = 0) Then
  12.             Timer1.Start()
  13.         Else
  14.             Timer1.Stop()
  15.         End If
  16.     End Sub
  17. End Class
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement