Members

Technology Zones

IBM Learning Center

Articles

Hosted By

MaximumASP

Info

[140] Make the PC beep

Last post 01-15-2007 8:05 PM by Bobjmamin. 15 replies.
Page 1 of 2 (16 items) 1 2 Next >
Sort Posts: Previous Next
  • 01-01-1999 12:00 AM

    [140] Make the PC beep

    This thread is for discussions of Make the PC beep.

    • Post Points: 45
  • Advertisement

    • Red Gate Software

    Advertisement

    Want to boost your .NET application performance?

    Some developers always seem to write efficient and lightening-fast code. What is their secret? It’s ANTS Profiler. “We improved the performance of the application up to 10 times” Dan Ports, Intrigma.

    Try it for yourself now.

  • 02-07-2003 6:52 AM In reply to

    • dzjowk
    • Not Ranked
    • Joined on 02-07-2003
    • New Member
    • Points 30

    Help?

    Hi,
    I'm merely a N00b in VB-programming...
    I tried docmd.beep for beeping on errors and such.
    But as you said, this only works when there's a soundcard installed ánd speakers attached.

    I tried to use your beep code, but I just can't seem to get it right.

    declare Function Beep Lib "kernel32" (ByVal dwFreq As Long, ByVal dwDuration As Long) As Long
    beep 500 1000

    could U specify what comes where ?
    (inside function, new function... ?)

    Tha in Adva
    • Post Points: 0
  • 06-12-2003 11:20 AM In reply to

    hey dzjowk,
    i had the same problem.  i figured it out.  simply place the declare function .... line in your program declarations.  it is not declared as a separate funciton.  here's  my code:

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

    Private Sub Command1_Click()

    Beep 500, 100

    End Sub
    • Post Points: 0
  • 06-12-2003 11:44 AM In reply to

    • dzjowk
    • Not Ranked
    • Joined on 02-07-2003
    • New Member
    • Points 30
    Tha a Lot Palley!
    • Post Points: 0
  • 06-13-2003 8:06 AM In reply to

    huh?  is this english?
    • Post Points: 0
  • 06-13-2003 9:10 AM In reply to

    • dzjowk
    • Not Ranked
    • Joined on 02-07-2003
    • New Member
    • Points 30
    I've made it a hobby of mine making up my own english...
    Sowwy d00d
    • Post Points: 0
  • 07-18-2003 10:58 AM In reply to

    No beep()

    The recommended "kernel32" function didn't work for me (source below).  Notes: VB.Net, Visual Studio, XP Pro.  Every hardware and software sound setting is PEGGED and unmuted (in case you were thinking of asking).

    ???s
    * The beep() doc goes on and on about UIPermissions; any advice/thoughts here?  If this were the issue I would think it would throw a runtime error, which it doesn't.  Try/Catch caught nothing.
    * Numerous of the "sound profile" settings in XP's setup are set to nothing.  Does beep() use one of these (which)?

    Any help appreciated.
    =PDG=
    ---
    Public Class Form1
    Inherits System.Windows.Forms.Form

    #Region " Windows Form Designer generated code "    

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

    Private Sub btnBeep_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnBeep.Click
           Beep(500, 1000)
           MsgBox("Did the beep thing")
    End Sub

    End Class
    ---
    • Post Points: 0
  • 07-18-2003 11:29 AM In reply to

    sorry

    I know just enough of VB to be dangerous.  I am not a software engineer by any means.  I can tell you this code runs on windows NT, 98, and XP boxes just fine (at least the way i did it).  Also, I wrote it using VB 6.  

    i would suggest opening a new .exe and just putting the command button in with just my source.  i am not at all familiar with your instring declarations.

    sorry i couldn't help more.

    • Post Points: 0
  • 07-18-2003 12:10 PM In reply to

    Thanks anyway.  I'm also relatively new to VB.  I think that this is a ".Net" issue and I'm sure your code works with VB6.  All the "instring" stuff you note is generated by VB.Net; this is, as you suggest, just a form with a button that is supposed to beep.  Thanks again.
    • Post Points: 0
  • 07-18-2003 9:08 PM In reply to

    As it turns out out this is a widely known problem once you know what to look for.  It is the result of uninstalling Norton Anti-Virus; it deletes "Default Beep" for the current user.  A variety of solutions are apparently available; I chose what appeared to be the most idiot-proof:

    1) Create a new user (assuming you have admin auth)
    2) As new user run regedit.
    3) Expand HKEY_CURRENT_USER
    4) Right click on HKEY_CURRENT_USER\AppEvents
    5) Export as somefilename.reg
    6) Log off new user and back on as original user
    7) Double click somefilename.reg
    8) Answer 'yes" to the prompt.

    That's it; no re-boot or anything.
    • Post Points: 0
  • 10-06-2003 10:23 PM In reply to

    • bubba
    • Not Ranked
    • Joined on 10-06-2003
    • New Member
    • Points 5

    Values for Beep

    Are there values to control the interval between beeps and to control the volume of the beep?
    Thanks,
    David.
    • Post Points: 0
  • 04-29-2004 1:21 PM In reply to

    • Zaggy
    • Not Ranked
    • Joined on 04-29-2004
    • New Member
    • Points 10

    Help with different OS'es

    I coded a simple program that makes different tones, the programs runs fine on users with windows xp, but it gives the same tone all the time with ppl running Windows 98, what can I do to give em all the tones
    • Post Points: 0
  • 02-05-2005 1:37 PM In reply to

    its true

    i am trying get a sound out of the internal pc speaker for 2 days and i am still trying. i have win 98, i consider myself prety advanced in vb language . i searched more on google. i found a driver for pc speaker. it still didn't work . i downloaded a program that said that it makes the internal speaker beep, but no, it made the same visual basic beep. whatever frequency or how many miliseconds i set for the beep its still makes the vb beep through my headphones.
    can someone pls answer these problems?
    • Post Points: 0
  • 09-14-2005 2:51 AM In reply to

    • Bladerun
    • Not Ranked
    • Joined on 09-14-2005
    • New Member
    • Points 5

    Two beeps

    Is it possible to make VB create two tones at the same time?
    • Post Points: 0
  • 05-25-2006 1:33 PM In reply to

    • carina_a
    • Not Ranked
    • Joined on 05-25-2006
    • Malaysia
    • New Member
    • Points 10

    Re: [140] Help to display a form message before the PC beep sound!

    Hi,

    I have successfully get the beep sound out. However, how to display a form and then only the beep sound? Currently the beep sound is out before the form is displayed.Where should I put the this line : Beep 500, 9000 ?? If I were to put inside the form, then it will call the sound even before the form is displayed. Please advice.

    Thanks.

     

     

     

    • Post Points: 10
Page 1 of 2 (16 items) 1 2 Next >