Im trying to make a simple timer that adds to a label every second. I can do this in VB, but I dont exactly know the syntax for VC. Im using Visual Studio 2003.
Here is how I do it in VB. The "Seconds" variable is declared globally because other functions refference it.
Could someone please tell me how to do this in VC++?Code:Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick Dim Secs As Long Secs = DateDiff(DateInterval.Second, dStart, DateTime.Now) Seconds = Secs lblTime.Text = Secs End Sub




Reply With Quote