Tuesday, May 6, 2008

NetMobile.Varios - To execute Beep function (Symbol MC3000) in Pocket PC

Execute Beep function (Symbol MC3000) on Pocket PC

To executre a Beep sound on a pocket PC (tested on Symbol MC3000) use this code:

(NetMobile Generator, Genexus 9.0.)

Event Enter
do 'Beep'
EndEvent // Enter

sub 'Beep'
csharp Beep();
csharp }

csharp static Symbol.Audio.Controller MyAudioController;

csharp public static void Beep(){
csharp if (MyAudioController==null){
csharp
csharp Symbol.Audio.Device
MyDevice=(Symbol.Audio.Device)Symbol.StandardForms.SelectDevice.Select
Symbol.Audio.Controller.Title,Symbol.Audio.Device.AvailableDevices);
csharp if(MyDevice
==null){System.Windows.Forms.MessageBox.Show("No Device Selected",
"SelectDevice"); return;}
csharp else{
csharp
if(MyDevice.AudioType==Symbol.Audio.AudioType.StandardAudio)
csharp MyAudioController = new
Symbol.Audio.StandardAudio(MyDevice);
csharp else if
MyDevice.AudioType==Symbol.Audio.AudioType.SimulatedAudio)
csharp MyAudioController = new
Symbol.Audio.SimulatedAudio(MyDevice);
csharp else{ System.Windows.Forms.MessageBox.Show("Unknown
Device Type"); return;}
csharp }
csharp }
csharp MyAudioController.PlayAudio(1500,2670);
csharp MyAudioController.Dispose();
csharp
endsub

Setup model properties: Compiler Flags = /r:bin\Symbol.Audio.dll /r:bin\Symbol.dll /r:bin\Symbol.StandardForms.dll
Copy the Dlls in bin directory.

Add the Dlls (symbol librarys) a "Additional Files" when deploy presssing F5.

This files are required:
Symbol.StandardForms.dll
Symbol.Audio.dll
sonido.cs

Ask them to mundosupport@gmail.com


View original link => http://mundosupport.blogspot.com/2008/02/netmobilevarios-ejecutar-beep-function.html


 

No comments: