472,988 Members | 2,845 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,988 software developers and data experts.

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 6744
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
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
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
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
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
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
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
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
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
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
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
by: lllomh | last post by:
Define the method first this.state = { buttonBackgroundColor: 'green', isBlinking: false, // A new status is added to identify whether the button is blinking or not } autoStart=()=>{
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 4 Oct 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM) The start time is equivalent to 19:00 (7PM) in Central...
0
tracyyun
by: tracyyun | last post by:
Hello everyone, I have a question and would like some advice on network connectivity. I have one computer connected to my router via WiFi, but I have two other computers that I want to be able to...
2
by: giovanniandrean | last post by:
The energy model is structured as follows and uses excel sheets to give input data: 1-Utility.py contains all the functions needed to calculate the variables and other minor things (mentions...
4
NeoPa
by: NeoPa | last post by:
Hello everyone. I find myself stuck trying to find the VBA way to get Access to create a PDF of the currently-selected (and open) object (Form or Report). I know it can be done by selecting :...
1
by: Teri B | last post by:
Hi, I have created a sub-form Roles. In my course form the user selects the roles assigned to the course. 0ne-to-many. One course many roles. Then I created a report based on the Course form and...
0
isladogs
by: isladogs | last post by:
The next online meeting of the Access Europe User Group will be on Wednesday 6 Dec 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, Mike...
4
by: GKJR | last post by:
Does anyone have a recommendation to build a standalone application to replace an Access database? I have my bookkeeping software I developed in Access that I would like to make available to other...
3
SueHopson
by: SueHopson | last post by:
Hi All, I'm trying to create a single code (run off a button that calls the Private Sub) for our parts list report that will allow the user to filter by either/both PartVendor and PartType. On...

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.