Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

trying to gaet my timer app to Beep

Status
Not open for further replies.

cal555

Programmer
May 5, 2006
71
0
0
US
Hi,
I have a simple timer app that works, but I tryed to put an API Beep prodedure in it. I am not sur why but it is not beeping and not erroring. At the end of the time it goes into the if statement and displays my message, goes through the Beep; but does not Beep. I also tried puting it in other places in the code and it still does not work. I also tested my computer sound and everything seems to be working (like critical stop, Tab and sound in general). Any ideas I would really appreciate.
Thank you

Here is my code
In a module I have:
Public Declare Function Beep Lib "kernel32" (ByVal dwFreq As Long, ByVal dwDuration As Long) As Long

In my form I have:

Private Sub Timer1_Timer()
Dim a As Variant

Text1.Text = Time()
'NT = counter + 1 'we set the counter to count here

If Time() > NT Then
Timer1.Interval = 500
lblDone.Visible = lblDone.Visible = False

Beep 500, 2000

End If

'Text1.Text = counter 'write the counter value out as text
Me.Refresh

End Sub



 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top