• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 147
  • Last Modified:

BEEEEEEEEEEEP

While Giving a Message i want give a sound to the user .... How th Do it..... Pls Hlp
0
drav_i
Asked:
drav_i
1 Solution
 
CimperialiCommented:
Private sub SaySomething()
  Beep
  msgbox "Your message"
End Sub

0
 
CimperialiCommented:
Or use
Private Declare Function sndPlaySound Lib "winmm.dll" Alias "sndPlaySoundA" (ByVal lpszSoundName As String, ByVal uFlags As Long) As Long

Const SND_ASYNC = &H1
Const SND_NODEFAULT = &H2


sndPlaySound aFileName.wav, SND_ASYNC Or SND_NODEFAULT
0
 
deightonCommented:
Option Explicit
Private Declare Function Beep Lib "kernel32" (ByVal dwFreq As Long, ByVal dwDuration As Long) As Long

Private Sub Command1_Click()
Beep 1000, 1000
End Sub

0
 
y2kswCommented:
Additional Beep info:

Windows NT:

The Beep function is synchronous in all but one case; the function does not generally return control to its caller until the sound finishes. The exception to this occurs when dwDuration has the value  - 1. In that case, Beep is asynchronous, returning control immediately to its caller while the sound continues playing. The sound continues until the next call to Beep.

Windows 95:

The Beep function ignores the dwFreq and dwDuration parameters. On computers with a sound card, the function plays the default sound event. On computers without a sound card, the function plays the standard system beep.
0
 
CleanupPingCommented:
Hi drav_i,
This old question (QID 20566251) needs to be finalized -- accept an answer, split points, or get a refund.  Please see http://www.cityofangels.com/Experts/Closing.htm for information and options.
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now