Home
Search
 
What's New
Index
Books
Links
Q & A
Newsletter
Banners
 
Feedback
Tip Jar
 
C# Helper...
 
XML RSS Feed
Follow VBHelper on Twitter
 
 
MSDN Visual Basic Community
 
 
 
 
 
TitleMake a beep with a non-standard frequency and duration
Keywordsbeep, tone, sound, frequency
CategoriesAPI, Multimedia
 
Use the Beep API function, passing it the frequency and duration you want.
 
Private Declare Function APIBeep Lib "kernel32" Alias _
    "Beep" (ByVal dwFreq As Long, ByVal dwDuration As Long) _
    As Long

Private Sub Command1_Click()
Dim frequency As Long

    frequency = CLng(txtFrequency.Text)
    APIBeep frequency, 500
End Sub
 
 
Copyright © 1997-2010 Rocky Mountain Computer Consulting, Inc.   All rights reserved.
  Updated