IEatJ00erBaybees
2008-01-19 20:24:39
Well, you heard it from me. I'm a VB Noob. So I found a tutorial on download.com and we're making a stop watch, but I don't really understand how the variables work on here. Here is all the code. The download to it is:
http://www.download.com/3001-2251_4-10508664.html
Did I set all this stuff up right?
Thanks.
http://www.download.com/3001-2251_4-10508664.html
Option Explicit On
Public Class frmStopWatch
Dim StartTime As VariantType
Dim EndTime As VariantType
Dim ElapsedTime As VariantType
Private Sub cmdStart_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdStart.Click
'Establish and print starting time
StartTime = VariantType.Integer
lblStart.Text = Format(StartTime, "hh:mm:ss")
lblEnd.Text = ""
lblElapsed.Text = ""
End Sub
Private Sub cmdEnd_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdEnd.Click
'Find the Ending Time, Compute the Elapsed Time
'Put Both Values in Label Boxes
EndTime = VariantType.Integer
ElapsedTime = EndTime - StartTime
lblElapsed.Text = Format(EndTime, "hh:mm:ss")
lblElapsed.Text = Format(ElapsedTime, "hh:mm:ss")
End Sub
Private Sub cmdExit_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdExit.Click
End
End Sub
End ClassDid I set all this stuff up right?
Thanks.