Timer problem in vb
Results 1 to 3 of 3

Thread: Timer problem in vb

  1. #1
    Registered User
    Join Date
    Apr 2001
    Posts
    21

    Question Timer problem in vb

    When I set the timer interval for two timers as 1, and they are both enabled at the same time it seems to go faster then when only one is enabled, could this be a problem with my computer or Vb itself, someone else try it

    sample code below with the timers controling the two images(command buttons to enable the timers one at a time)

    Public m As Integer
    Private Sub Command1_Click()
    Timer1.Enabled = True
    End Sub

    Private Sub Command2_Click()
    Timer2.Enabled = True
    End Sub

    Private Sub Form_Load()
    m = 100
    End Sub

    Private Sub Timer1_Timer()
    Image1.Top = Image1.Top - m
    End Sub

    Private Sub Timer2_Timer()
    Image2.Top = Image2.Top - m
    End Sub

  2. #2
    Registered User
    Join Date
    Oct 2000
    Location
    Kansas City, MO
    Posts
    1,162

    Post

    100ms is pretty fast. Almost to fast to even need a timer.

    What are you trying to do? Your sample clips look ok. I don't think it's a bug. If you want send me your project or an example of what you are doing. I'll see what I can do. Remember to comment your code.
    [email protected]

    -opiate

  3. #3
    Registered User
    Join Date
    Dec 2000
    Location
    Circle Pines,MN,USA
    Posts
    805

    Post

    I am with opiate....Why use a timer in this situation. Your just creating exess processing time. I am curious.

Bookmarks

Posting Permissions

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