Quantcast
Channel: Timer
Viewing all articles
Browse latest Browse all 4

Timer

$
0
0
use stopwatch instead. you can change the Elapsed to whatever you want (minutes, milliseconds, etc)

Dim sw As New Stopwatch
    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click

        sw.Start()

    End Sub

    Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
        sw.Stop()
        MessageBox.Show(sw.Elapsed.Seconds.ToString)
    End Sub

Viewing all articles
Browse latest Browse all 4

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>