how we use timer

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • sareeka
    New Member
    • Feb 2010
    • 2

    how we use timer

    We put a picturebox & timer
    we have put 3pics in any drive ok
    now when we debug it ,3pics run automatic the suport of timer. plz send the code imidietly
  • sashi
    Recognized Expert Top Contributor
    • Jun 2006
    • 1749

    #2
    Dear Sareeka,

    plz send the code imidietly
    I think you need to be more specific when delivering problem statement. It will be a lot more easier to narrow down problem as well as ensure desired solution.

    One more thing, we here at the Bytes help novice programmers to debug their code. We do not write programme for them. The Bytes is rich with code snippets / sample codes from previous problem statement encountered by other users. Please run a search here before even asking a question.

    Hope you understand what i am trying to tell. Take care & have a wonderful day ahead :)

    Comment

    • sashi
      Recognized Expert Top Contributor
      • Jun 2006
      • 1749

      #3
      This code segment will popup a simple message box showing the current system time every 5 seconds.

      Add a timer control & 2 button controls on your form

      Button1 : Enable timer
      Button2 : Disable timer

      Code:
      Private Sub Form1_Load(ByVal sender As Object, ByVal e As System.EventArgs)
        Timer1.Enable = True
        Timer1.Interval = 5000 '//--- is equivalent to 5 * 1000miliseconds)
       End Sub
      
      Private Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs)
        Timer1.Enable = True
      End Sub
      
      Private Sub Button2_Click(ByVal sender As Object, ByVal e As System.EventArgs)
        Timer1.Enable = False
      End Sub
      
      Private Sub Timer1_Tick(ByVal sender As Object, ByVal e As System.EventArgs)
        Msgbox("The time is : " & Now())
      End Sub

      Comment

      • tlhintoq
        Recognized Expert Specialist
        • Mar 2008
        • 3532

        #4
        3pics run automatic the suport of timer. plz send the code imidietl
        A) What does this even mean?
        B) Its a bit rude to tell the volunteers here to do your coding for you *immediately*

        Originally posted by Original Poster
        Can anybody send me code to [...]
        The Bytes volunteers are not here to write your code for you. This is not a free homework service.
        Bytes is very much a "Give me a fish I eat for a day. Teach me to fish I eat for a lifetime" kind of place. Just giving you the code doesn't help you learn near as effectively as good old-fashioned trial and error.

        Do a little reading up and experimenting then if your trials aren't doing what you expect, post the code and relevant messages/errors and we'll see what we can do to point you in the right direction for making it work.

        Try hitting Google with terms of your programming language and primary terms of what you want to do. For example "C# custom events" or "VB datagrid Excel". I've found this to be a very effective tool.

        May I suggest
        • First: Do some research. I heard about thing thing called Google, or books even.
        • Second: Do some experiments yourself. You will learn so much from actually trying it before throwing up your hands in defeat before even starting.
        • Third: Show the volunteers here the code that you created that was the closest to successful along with relevant errors.

        Please visit the Posting Guidelines for tips on how to ask questions to get the best help.

        Comment

        Working...