CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Sep 2001
    Location
    San Diego, California
    Posts
    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.

  2. #2
    Join Date
    Apr 2000
    Posts
    737

    Re: StopWatch slower on Win9x

    as far as i know, the timer message will only be trigger at most 50ms once... not until 1ms.


    HTH

    cksiow
    http://vblib.virtualave.net - share our codes

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured