|
-
September 10th, 2001, 05:28 PM
#1
StopWatch slower on Win9x
I'm total beginner in VB and I already had my first headache...
Created this stop watch in VB6 Enterprise SP5, in windows 2000 professional. Created executable file in order to distribute it to my friends.
Guess what: The stopwatch ran 10 times slower in win95 and win98. In other win2000 machines worked beatifully. What's wrong ?????
option Explicit
Dim sec as Integer
Dim min as Integer
Dim mili as Integer
private Sub cmdExit_Click()
'unloads form
Unload frmStpWatch
set frmStpWatch = nothing
End Sub
private Sub cmdReset_Click()
'resets textboxes and variables and disable trmMili
txtMin.Text = "00"
txtSec.Text = "00"
txtMili.Text = "00"
sec = 0
min = 0
mili = 0
tmrMili.Enabled = false
End Sub
private Sub cmdStart_Click()
'starts tmrMili
tmrMili.Enabled = true
End Sub
private Sub cmdStop_Click()
'stops tmrMili
tmrMili.Enabled = false
End Sub
private Sub tmrMili_Timer()
'counts the miliseconds
mili = mili + 1
If mili < 100 then
txtMili.Text = mili
else
mili = 0
sec = sec + 1
txtSec.Text = sec
'counts seconds and minutes
If sec = 60 then
sec = 0
min = min + 1
txtMin.Text = min
txtSec.Text = "00"
End If
End If
End Sub
Ed C.B.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|