DotNetNewsgroup.com  
web access to complete list of Microsoft.NET newsgroups
   home   |   control panel login   |   archive  |  
 
  carried group
academic
adonet
aspnet
aspnet.announcements
aspnet.buildingcontrols
aspnet.caching
aspnet.datagridcontrol
aspnet.mobile
aspnet.security
aspnet.webcontrols
aspnet.webservices
assignment_manager
datatools
dotnet.distributed_apps
dotnet.general
dotnet.myservices
dotnet.nternationalization
dotnet.scripting
dotnet.security
dotnet.vjsharp
dotnet.vsa
dotnet.xml
dotnetfaqs
framework
framework.clr
framework.compactframework
framework.component_services
framework.controls
framework.databinding
framework.drawing
framework.enhancements
framework.interop
framework.odbcnet
framework.performance
framework.remoting
framework.sdk
framework.setup
framework.webservices
framework.windowsforms
framework.wmi
frwk.windowsforms.designtime
lang.csharp
lang.jscript
lang.vb
lang.vb.controls
lang.vb.data
lang.vb.upgrade
lang.vc
lang.vc.libraries
  
 
start date: Mon, 23 Jul 2007 16:03:37 -0400,    posted on: microsoft.public.dotnet.framework.compactframework        back       

Thread Index
  1    Dan
          2    Peter Foot [MVP]


Send beeps/tones to CE 4.2 scanner device   
How can I tell the windows mobile CE 4.2 device to raise a certain beep 
tone.  Is this possible?  When the user is scanning bar codes, they may not 
be looking at the screen for errors.  I'd like to raise an "Error" tone so 
the user can audibly hear there was an input error and then look on to the 
display for intructions.  Has anyone tried this?
Date:Mon, 23 Jul 2007 16:03:37 -0400   Author:  

Re: Send beeps/tones to CE 4.2 scanner device   
You can P/Invoke MessageBeep (see the SDK for details) to play default beep 
noises, or PlaySound to play any .wav file. There are also third-party 
wrapper classes, I wrote SystemSounds and SoundPlayer classes for .NETCF 
which appear in Mobile In The Hand 
(http://inthehand.com/content/Mobile.aspx) and elsewhere. The P/Invokes are 
below:-

[DllImport("coredll.dll", EntryPoint="MessageBeep", SetLastError=true)]
  private static extern void MessageBeep(int type);

usage:-

MessageBeep(0);


[DllImport("coredll.dll", EntryPoint="PlaySoundW", SetLastError=true) ]
  private extern static bool PlaySound(string lpszName, IntPtr hModule, int 
dwFlags);

usage:-

PlaySound("\\windows\\mywav.wav", IntPtr.Zero, 0x20000);

Peter

-- 
Peter Foot
Microsoft Device Application Development MVP
www.peterfoot.net | www.inthehand.com
In The Hand Ltd - .NET Solutions for Mobility


"Dan"  wrote in message 
news:O3LRwSWzHHA.3940@TK2MSFTNGP05.phx.gbl...

> How can I tell the windows mobile CE 4.2 device to raise a certain beep 
> tone.  Is this possible?  When the user is scanning bar codes, they may 
> not be looking at the screen for errors.  I'd like to raise an "Error" 
> tone so the user can audibly hear there was an input error and then look 
> on to the display for intructions.  Has anyone tried this?
> 
Date:Mon, 23 Jul 2007 21:32:34 +0100   Author:  

Google
 
Web dotnetnewsgroup.com


COPYRIGHT ?2005, EUROFRONT WORLDWIDE LTD., ALL RIGHT RESERVE  |   Contact us