?
Solved

BEEEEEEEEEEEP

Posted on 2003-03-28
5
Medium Priority
?
146 Views
Last Modified: 2010-05-01
While Giving a Message i want give a sound to the user .... How th Do it..... Pls Hlp
0
Comment
Question by:drav_i
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
5 Comments
 
LVL 5

Expert Comment

by:Cimperiali
ID: 8223960
Private sub SaySomething()
  Beep
  msgbox "Your message"
End Sub

0
 
LVL 5

Accepted Solution

by:
Cimperiali earned 60 total points
ID: 8223970
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
 
LVL 18

Expert Comment

by:deighton
ID: 8224117
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
 
LVL 3

Expert Comment

by:y2ksw
ID: 8224950
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
 

Expert Comment

by:CleanupPing
ID: 8531421
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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

There are many ways to remove duplicate entries in an SQL or Access database. Most make you temporarily insert an ID field, make a temp table and copy data back and forth, and/or are slow. Here is an easy way in VB6 using ADO to remove duplicate row…
You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Suggested Courses

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question