Key clicks possible? PC beep?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Ross

    Key clicks possible? PC beep?

    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


  • Ken Tucker [MVP]

    #2
    Re: Key clicks possible? PC beep?

    Hi,

    Maybe this will work

    Private Sub Form1_KeyPress( ByVal sender As Object, ByVal e As
    System.Windows. Forms.KeyPressE ventArgs) Handles Me.KeyPress
    Beep()
    End Sub

    Ken
    -------------------------------
    "Ross" <WordVba@scient ial.net> wrote in message
    news:%231HAuaB4 FHA.1184@TK2MSF TNGP12.phx.gbl. ..[color=blue]
    > 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
    >
    >[/color]


    Comment

    • m.posseth

      #3
      Re: Key clicks possible? PC beep?

      Note that this will only beep the speaker , if your computer does not have a
      sound card installed
      otherwise the call will be routed to the sound card to handle , well on my
      computer the sound is in the evening turned to 0 ( hmm i even noticed it is
      now also turned of ) so i will not here the beeps on my computer at all



      regards

      Michel Posseth


      "Ken Tucker [MVP]" <vb2ae@bellsout h.net> schreef in bericht
      news:OfLwtLC4FH A.3976@TK2MSFTN GP15.phx.gbl...[color=blue]
      > Hi,
      >
      > Maybe this will work
      >
      > Private Sub Form1_KeyPress( ByVal sender As Object, ByVal e As
      > System.Windows. Forms.KeyPressE ventArgs) Handles Me.KeyPress
      > Beep()
      > End Sub
      >
      > Ken
      > -------------------------------
      > "Ross" <WordVba@scient ial.net> wrote in message
      > news:%231HAuaB4 FHA.1184@TK2MSF TNGP12.phx.gbl. ..[color=green]
      >> 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
      >>
      >>[/color]
      >
      >[/color]


      Comment

      • Herfried K. Wagner [MVP]

        #4
        Re: Key clicks possible? PC beep?

        "Ross" <WordVba@scient ial.net> schrieb:[color=blue]
        > 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)?[/color]

        \\\
        Private Declare Function Beep Lib "kernel32.d ll" ( _
        ByVal dwFreq As Int32, _
        ByVal dwDuration As Int32 _
        ) As Boolean
        ///

        --
        M S Herfried K. Wagner
        M V P <URL:http://dotnet.mvps.org/>
        V B <URL:http://classicvb.org/petition/>

        Comment

        • AMercer

          #5
          Re: Key clicks possible? PC beep?

          > Private Declare Function Beep Lib "kernel32.d ll" ( _[color=blue]
          > ByVal dwFreq As Int32, _
          > ByVal dwDuration As Int32 _
          > ) As Boolean[/color]

          Try dwFreq in the range 40 to 400 and dwDuration 1.

          Comment

          Working...