473,508 Members | 2,326 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Beep() not making a sound-how to fix?

Hello,

I want to use the Beep() to alert users about certain
messages but in my workstation I can't get a sound out of
it. But Beep works in VB6. What do I need to do?

Sub...
....
Beep()
For i = 0 to 100: Beep(): Next
MsgBox "testing"
....

No sound. Is it my workstation or do I need to do
something else?

Thanks,
Rich
Nov 20 '05 #1
4 6846
well I usually use the Beep api:

Declare Function Beep Lib "kernel32.dll" Alias "Beep" (ByVal freq As
Integer, ByVal duration As Integer) As Boolean


"Rich" <an*******@discussions.microsoft.com> wrote in message
news:e0****************************@phx.gbl...
Hello,

I want to use the Beep() to alert users about certain
messages but in my workstation I can't get a sound out of
it. But Beep works in VB6. What do I need to do?

Sub...
...
Beep()
For i = 0 to 100: Beep(): Next
MsgBox "testing"
...

No sound. Is it my workstation or do I need to do
something else?

Thanks,
Rich

Nov 20 '05 #2
I got build errors with this API. May I ask how you
invoke it? I placed a call in a button click event but
got the blue scwigly line.

Sub button1...
Call Beep()
End Sub

-----Original Message-----
well I usually use the Beep api:

Declare Function Beep Lib "kernel32.dll" Alias "Beep" (ByVal freq AsInteger, ByVal duration As Integer) As Boolean


"Rich" <an*******@discussions.microsoft.com> wrote in messagenews:e0****************************@phx.gbl...
Hello,

I want to use the Beep() to alert users about certain
messages but in my workstation I can't get a sound out of it. But Beep works in VB6. What do I need to do?

Sub...
...
Beep()
For i = 0 to 100: Beep(): Next
MsgBox "testing"
...

No sound. Is it my workstation or do I need to do
something else?

Thanks,
Rich

.

Nov 20 '05 #3
oops I forgot,,, u need:

Imports System.Runtime.InteropServices


"Rich" <an*******@discussions.microsoft.com> wrote in message
news:dd****************************@phx.gbl...
I got build errors with this API. May I ask how you
invoke it? I placed a call in a button click event but
got the blue scwigly line.

Sub button1...
Call Beep()
End Sub

-----Original Message-----
well I usually use the Beep api:

Declare Function Beep Lib "kernel32.dll" Alias "Beep"

(ByVal freq As
Integer, ByVal duration As Integer) As Boolean


"Rich" <an*******@discussions.microsoft.com> wrote in

message
news:e0****************************@phx.gbl...
Hello,

I want to use the Beep() to alert users about certain
messages but in my workstation I can't get a sound out of it. But Beep works in VB6. What do I need to do?

Sub...
...
Beep()
For i = 0 to 100: Beep(): Next
MsgBox "testing"
...

No sound. Is it my workstation or do I need to do
something else?

Thanks,
Rich

.

Nov 20 '05 #4
Thank you. I will give that a try.
-----Original Message-----
oops I forgot,,, u need:

Imports System.Runtime.InteropServices


"Rich" <an*******@discussions.microsoft.com> wrote in messagenews:dd****************************@phx.gbl...
I got build errors with this API. May I ask how you
invoke it? I placed a call in a button click event but
got the blue scwigly line.

Sub button1...
Call Beep()
End Sub

>-----Original Message-----
>well I usually use the Beep api:
>
>Declare Function Beep Lib "kernel32.dll" Alias "Beep"

(ByVal freq As
>Integer, ByVal duration As Integer) As Boolean
>
>
>
>
>"Rich" <an*******@discussions.microsoft.com> wrote in

message
>news:e0****************************@phx.gbl...
>> Hello,
>>
>> I want to use the Beep() to alert users about certain
>> messages but in my workstation I can't get a sound
out of
>> it. But Beep works in VB6. What do I need to do?
>>
>> Sub...
>> ...
>> Beep()
>> For i = 0 to 100: Beep(): Next
>> MsgBox "testing"
>> ...
>>
>> No sound. Is it my workstation or do I need to do
>> something else?
>>
>> Thanks,
>> Rich
>
>
>.
>

.

Nov 20 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
31791
by: Leo | last post by:
hi there i want python to do a beep. in the docu i found in tkinter the method bell() but the script: import Tkinter Tkinter.bell() gives the error:
2
8732
by: bill_m | last post by:
Has anyone tried to use the .NET Beep function? The following works in VBA: Private Declare Function Beep Lib "Kernel32.dll" _ (ByVal X As Long, ByVal Y As Long) As Long Dim blVal As...
19
56577
by: Anon Email | last post by:
Hi everyone, Let's see, now. This question is about the capabilities of ANSI C++. I want to write and compile code in ANSI C++ that, when compiled, will make the computer speaker beep; or, at...
3
5450
by: MLH | last post by:
Sound works on my computer. I can play MIDI files, audio CD's. My standard wave files play OK (IE, C:\windows\Media\tada.wav). But running DoCmd Beep doesn't result in a sound. What can I...
1
1703
by: Ahmed Fat-hi | last post by:
I need function that generates simple tone with frequency 1562.5 HZ to be played on the audio device for duration 1920 microseconds. i can not use the Beep function since it has the following...
5
15100
by: John Lee | last post by:
Hi, It's anoying each time the computer beeps when MessageBox.Show() popsup - I turned off all sound in control panel - audio setting but it still beeps. Can anyone help? Thanks! John
4
1776
by: Ross | last post by:
Anyone have any code that will sound a click from the PC speaker with keystrokes? Any easy way to get a beep out of the PC speaker (not through the sound card)? Thanks, Ross
4
14115
by: Shyguy | last post by:
I have never used the DoCmd.Beep method and as far as I can tell all I need to do is enter "DoCmd.Beep". I put this behind a buttons on click and nothing. My sound is working. The computers beep...
4
2859
by: adi | last post by:
Hi My application has many automatic features because it is designed to run without any user interfering. In fact, my app will work on a system without a keyboard or a mouse. Anyway, from time...
5
29033
by: =?Utf-8?B?UmFmYWVs?= | last post by:
I'm studying C# (I've been a VB developer). I'm making some tests and I need to use Console.Beep(), but it doesn't make any sound, no matter if I try it in VS2008 beta or VS2005. Could anybody...
0
7224
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7323
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7379
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
7038
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
5625
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
4706
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3192
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
1550
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
763
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.