Results 1 to 7 of 7

Thread: Timer Alarm

Threaded View

  1. #1

    Thread Starter
    New Member
    Join Date
    Mar 2008
    Posts
    15

    Question Timer Alarm

    im having trouble gettin a wav fiile to play heres my code
    i uploaded the vbp files
    VB 6 Code:
    1. Private Sub Command1_Click()
    2. Timer1.Enabled = True
    3. End Sub
    4.  
    5. Private Sub Command2_Click()
    6. Timer1.Enabled = False
    7. End Sub
    8.  
    9. Private Sub Command3_Click()
    10. Dim timer
    11. timer = Text4
    12. Open App.Path & "\" + timer + ".txt" For Output As #1
    13. Write #1,
    14. Close #1
    15.  
    16. End Sub
    17.  
    18. Private Sub Command4_Click()
    19. If alarm1.Text = Text1.Text And alarm2.Text = Text2.Text And alarm3.Text = Text3.Text Then play.Enabled = True
    20.  
    21. End Sub
    22.  
    23. Private Sub Command5_Click()
    24. play.URL = Text6.Text
    25. End Sub
    26.  
    27. Private Sub Form_Load()
    28.  
    29. End Sub
    30.  
    31. Private Sub Timer1_Timer()
    32. Text3.Text = Text3.Text + 1
    33. If Text3.Text = 60 Then
    34. Text2.Text = Text2.Text + 1
    35. Text3.Text = 0
    36. If Text2.Text = 60 Then
    37. Text1.Text = Text1.Text + 1
    38. Text2.Text = 0
    39. If alarm1.Text = Text1.Text And alarm2.Text = Text2.Text And alarm3.Text = Text3.Text Then play.Enabled = True
    40. End If
    41. End If
    42.  
    43. End Sub
    44.  
    45. Private Sub WindowsMediaPlayer1_OpenStateChange(ByVal NewState As Long)
    46.  
    47. End Sub
    Attached Files Attached Files
    Last edited by acms; Jul 9th, 2008 at 09:31 AM. Reason: blue code lol

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