School Assignment? Project Due Tomorrow? Chat LIVE With A Programming Expert!
You're Browsing As A Guest! Register Now...
Become an Expert!

Join 358,291 Programmers for FREE! Get instant access to thousands of experts, tutorials, code snippets, and more! There are 2,472 people online right now.Registration is fast and FREE... Join Now!



Console.Beep? What the beep!

52 Weeks of Code Challenge: Android

Week #11 of the 52 Weeks of Code Challenge is Android, you should give it a shot. Click Here!

Console.Beep? What the beep! Rate Topic: -----

#1 reCoded  Icon User is offline

  • D.I.C Regular
  • PipPipPip

Reputation: 5
  • View blog
  • Posts: 271
  • Joined: 25-February 08


Dream Kudos: 0

Posted 15 July 2009 - 07:24 AM

Hi all,

I am developing some software for a handheld device (Windows Moble). I want the device to make a Beep noise. Now I know in VS .NET 2.0-3.5 framework you can just simply do Console.Beep() and walah! Anyone know how I can do the same for my handheld? I dont get the option .Beep() probably due to the fact that its a moble.
Was This Post Helpful? 0
  • +
  • -


#2 eclipsed4utoo  Icon User is online

  • Not Your Ordinary Programmer
  • Icon

Reputation: 322
  • View blog
  • Posts: 2,471
  • Joined: 21-March 08


Dream Kudos: 650

Expert In: .NET

Re: Console.Beep? What the beep!

Posted 15 July 2009 - 07:53 AM

// For playing sounds
[System.Runtime.InteropServices.DllImport("coredll.dll")]
public static extern int PlaySound(string pszSound, int hmod, int fdwSound);



PlaySound("\\Windows\\Alarm3.wav", 0, 0x00020000);



That's how we do it on Symbol and Intermec devices running WM5.

This post has been edited by eclipsed4utoo: 15 July 2009 - 08:13 AM

Was This Post Helpful? 0
  • +
  • -

#3 Renagado  Icon User is offline

  • D.I.C Head
  • Icon

Reputation: 20
  • View blog
  • Posts: 229
  • Joined: 14-June 09


Dream Kudos: 100

Re: Console.Beep? What the beep!

Posted 15 July 2009 - 07:55 AM

I don't know if it works since I never used .net compact, but try:
Console.WriteLine("\a");

It works in normal .net :D

This post has been edited by Renagado: 15 July 2009 - 07:56 AM

Was This Post Helpful? 0
  • +
  • -

#4 AdamSpeight2008  Icon User is offline

  • The Bandido Coder
  • Icon

Reputation: 224
  • View blog
  • Posts: 3,489
  • Joined: 29-May 08


Dream Kudos: 4100

Expert In: vb.net, LINQ

Re: Console.Beep? What the beep!

Posted 15 July 2009 - 08:15 AM

Is this available?
 
 Media.SystemSounds.Beep.Play()


This post has been edited by AdamSpeight2008: 15 July 2009 - 08:18 AM

Was This Post Helpful? 0
  • +
  • -

#5 eclipsed4utoo  Icon User is online

  • Not Your Ordinary Programmer
  • Icon

Reputation: 322
  • View blog
  • Posts: 2,471
  • Joined: 21-March 08


Dream Kudos: 650

Expert In: .NET

Re: Console.Beep? What the beep!

Posted 15 July 2009 - 08:23 AM

View PostAdamSpeight2008, on 15 Jul, 2009 - 11:15 AM, said:

Is this available?
 
 Media.SystemSounds.Beep.Play()



in .Net CF 3.5, yes.
in .Net CF 2.0, no.
Was This Post Helpful? 0
  • +
  • -

#6 reCoded  Icon User is offline

  • D.I.C Regular
  • PipPipPip

Reputation: 5
  • View blog
  • Posts: 271
  • Joined: 25-February 08


Dream Kudos: 0

Re: Console.Beep? What the beep!

Posted 16 July 2009 - 04:01 AM

Thanks guys i will give it a try
Was This Post Helpful? 0
  • +
  • -



Fast Reply

  

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users



Live Help!

Be Social

Dream.In.Code RSS Feed Dream.In.Code LinkedIn Group Follow Us On Twitter Fan Us On Facebook

Tutorials

Programming

Web Development

Reference Sheets

Code Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month