views:

1200

answers:

4

hi

is it posible to make beep in WinCE ?

i try and i get an error

+3  A: 

Yes. P/Invoke PlaySound or sndPlaySound or MessageBeep. See this or this or this. It's amazing what 30 seconds with a search engine can turn up.

ctacke
+3  A: 

The .net framework methods for beeing are not available in the CF version of the framework. The best way to get a beep sound is to PInvoke into the MessageBeep function. The PInvoke signature for this method is pretty straight forward

[DllImport("CoreDll.dll")]
public static extern void MessageBeep(int code);

public static void MessageBeep() {
  MessageBeep(-1);  // Default beep code is -1
}

This blog post has an excellent more thorough example: http://blog.digitforge.com/?p=4

JaredPar
A: 

This blog entry may also be of interest.

ctacke
A: 

thanks a lot. it makes sense

mathhoang