CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Guest

    How to STOP a Timer?

    Any ideas? Have tried Timer1.Enabled = False but it doesn't seem to work.


  2. #2
    Join Date
    Apr 1999
    Location
    Madrid (Spain)
    Posts
    46

    Re: How to STOP a Timer?

    Hi:
    I believe that your idea is OK (Timer1.Enabled = False).
    I have tested the following program and work fine.



    Dim cont as Long
    private Sub Form_Load()
    Timer1.Interval = 10
    End Sub

    private Sub Start_Timer_Click()
    Timer1.Enabled = true
    End Sub

    private Sub Stop_Timer_Click()
    Timer1.Enabled = false
    End Sub

    private Sub Timer1_Timer()
    cont = cont + 1
    Text1.Text = cont
    End Sub





    Good luck. Bye..


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