468,457 Members | 1,608 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,457 developers. It's quick & easy.

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 6421
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 discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

6 posts views Thread by Leo | last post: by
2 posts views Thread by bill_m | last post: by
19 posts views Thread by Anon Email | last post: by
1 post views Thread by Ahmed Fat-hi | last post: by
5 posts views Thread by John Lee | last post: by
4 posts views Thread by Ross | last post: by
4 posts views Thread by Shyguy | last post: by
4 posts views Thread by adi | last post: by
5 posts views Thread by =?Utf-8?B?UmFmYWVs?= | last post: by
reply views Thread by NPC403 | last post: by
1 post views Thread by subhajit12345 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.