Beep in c#

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

    Beep in c#

    I'm a vb guy learning c#. What's the equivalent of the vb beep function in
    c#?

    --
    moondaddy@nospa m.nospam


  • Nicholas Paldino [.NET/C# MVP]

    #2
    Re: Beep in c#

    moondaddy,

    You could always set a reference to Microsoft.Visua lBasic.dll, and then
    call the static Beep method on the Interaction class in the
    Microsoft.Visua lBasic namespace.

    Hope this helps.


    --
    - Nicholas Paldino [.NET/C# MVP]
    - mvp@spam.guard. caspershouse.co m

    "moondaddy" <moondaddy@nosp am.nospam> wrote in message
    news:%239Cazf2V GHA.2444@TK2MSF TNGP14.phx.gbl. ..[color=blue]
    > I'm a vb guy learning c#. What's the equivalent of the vb beep function
    > in c#?
    >
    > --
    > moondaddy@nospa m.nospam
    >[/color]


    Comment

    • Mark Rae

      #3
      Re: Beep in c#

      "moondaddy" <moondaddy@nosp am.nospam> wrote in message
      news:%239Cazf2V GHA.2444@TK2MSF TNGP14.phx.gbl. ..
      [color=blue]
      > I'm a vb guy learning c#. What's the equivalent of the vb beep function
      > in c#?[/color]




      Comment

      • Frank Rizzo

        #4
        Re: Beep in c#

        moondaddy wrote:[color=blue]
        > I'm a vb guy learning c#. What's the equivalent of the vb beep function in
        > c#?
        >[/color]

        If you are writing a console app, you could use this:

        Console.Beep()

        Comment

        • Fred Mellender

          #5
          Re: Beep in c#

          Use the SystemSounds, as in:

          public void onePing()
          {
          SystemSounds.Be ep.Play();
          }This is new in v 2.0 of C#"moondaddy" <moondaddy@nosp am.nospam> wrote in
          message news:%239Cazf2V GHA.2444@TK2MSF TNGP14.phx.gbl. ..[color=blue]
          > I'm a vb guy learning c#. What's the equivalent of the vb beep function
          > in c#?
          >
          > --
          > moondaddy@nospa m.nospam
          >[/color]


          Comment

          • newscorrespondent@charter.net

            #6
            Re: Beep in c#



            SystemSounds.Be ep.Play();

            Comment

            • Chris Dunaway

              #7
              Re: Beep in c#

              You can also use that in a Windows Forms App:

              System.Console. Beep(250, 500);

              Comment

              Working...