Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

I know this is quite a simple question and I thought I knew it myself.

 

But...

 

How do you make your computer beep? I have all sorts of applications where I quick lil' beep to show it acknowledged it would be great.

 

I thought the command was..

 

Beep()

 

 

Is it not?

 

Please help! I've searched the "INDEX" and "HELP" sections but I've came up with the same thing.

 

Beep() with a few or more modificatinos for tone.

 

 

S.O.S!!

X-Corp

Take a hit

Posted

Thanks, I think it works. But i'm still having a bit of trouble.

 

I declared the following

 

Private Declare Function MessageBeep Lib "user32" (ByVal wType As Long) As Long

 

and then used "messagebeep (0)" whereever I want the beep.

 

As it said in the instructions... but.. I still get no beep.

 

hehe . I know I'm a dumbass. But bare with me!

X-Corp

Take a hit

Posted

I feel sort of emberassed because I'm not THAT stupid. But..

 

When it comes to this stuff it just dont seem to click. I know your probably rolling your eyes goin.. "What a stupid kid.." but i have not much experience and I'm trying to learn.

 

So far. I've changed the most of what I understood you for.

 

Private Declare Function MessageBeep Lib "user32" (ByVal wType As Int32) As Long

 

Is that what I was sopposed to change?

 

I was thinking of changing the "as long" at the end to "as int32" but..

 

that didn't work either

 

Sorry man! if you dont have the patients, I understand. But I dunno wherelse to go. lol

 

Thanks!!

X-Corp

Take a hit

  • *Experts*
Posted

If you want the motherboard's speaker to beep (the one inside your case), use:

Private Declare Function MessageBeep Lib "kernel32" (ByVal frequency As Int32, ByVal duration As Int32) As Int32

 

and call it with something like:

Beep(3000, 250)

 

The 250 is milliseconds (about a quarter second, the most I can stand of that tinny speaker) :)

 

I think the Microsof.VisualBasic namespace contains a Beep function that uses that as well.

 

-nerseus

"I want to stand as close to the edge as I can without going over. Out on the edge you see all the kinds of things you can't see from the center." - Kurt Vonnegut
  • Leaders
Posted

strange, the MessageBeep api should do the trick, i just did this ...

Private Declare Function MessageBeep Lib "user32.dll" (ByVal wType As Integer) As Integer

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
   MessageBeep(0)
End Sub

no problems.

Posted

Wow.. You guys are all confusing the heck out of me.

 

hahaha -- I'm not that experienced.

 

Anyway, I tryed your example volteface. right to the dot.. Of course including all the other source that is automaticly generated, and it dont work for me.. I dont have a motherboard speaker? lol.. I know a bunch about computers, just not programming (YET) And I'm sure I have an inboard speaker.

 

I have no ideas... Probably a missing dll or something?

X-Corp

Take a hit

Posted

just do this

 


Private Declare Function Beep Lib "kernel32" (ByVal dwFreq As Integer, ByVal dwDuration As Integer) As Integer

' in the actuall event put this,

beep (100, 100)

' the first 100 represents the pitch (how high or low the beep sounds) and the second represents how long it is (100 a good length)

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...