compact-framework

What is the use for a Mutex if you can't name it?

蹲街弑〆低调 提交于 2019-12-07 03:30:47
问题 I am having a hard time figuring out what good a mutex is without naming it. Specifically I want to make my Windows Mobile 6.5 app single-instance. There are a few questions and answers on this site about how to do that - and the best ones seem to use named mutexes. Unfortunately the CTORS for mutexes in compact framework do not take a string - one can only create a mutex. Now, what good is a mutex if it has no associated ID? Am I missing something? How do I use a mutex to protect a resource

Async/await for compact framework v3.5 - manual implementation

筅森魡賤 提交于 2019-12-07 01:30:45
问题 I have to develop an application for WinCE 5.0 which communicates/synchronizes data with a regular PC application which offers a webservice I can talk to with my mobile (industrial) device. Since it is obvious to result in code which is hard to maintain on the mobile device side (check connection → when completed: check webservice availability → when completed: check whether mobile device is eligible for syncing → when completed start exchanging data) I would love to use the syncronous way of

Knowing the state of orange button in motorola MC65

六月ゝ 毕业季﹏ 提交于 2019-12-06 15:49:32
问题 I need to be able to know what is the current state of orange button and be notified if this state has changed on Motorola device MC65. Sadly I can't use Symbol.Keyboard.KeyPad class since it is not supported on MC65 回答1: The docos state: Keyboard Supported feature - Only the following two API’s are supported on MC65. Symbol.Keyboard.KeyPad.SetKeyState. Symbol.Keyboard.KeyPad.GetKeyStateEx. Following keys are not supported in MC65. KEYSTATE_ALT, KEYSTATE_CTRL, KEYSTATE_NUMLOCK, KEYSTATE

How can I read a string from OpenNETCF.IO.Ports.SerialPort?

爱⌒轻易说出口 提交于 2019-12-06 15:37:40
I write commands to a belt printer using OpenNETCF.IO.Ports.SerialPort this way: public static bool SendCommandToPrinter(string cmd) { bool success; // init'd to false by default try { SerialPort serialPort = new SerialPort(); serialPort.BaudRate = 19200; serialPort.Handshake = Handshake.XOnXOff; serialPort.Open(); serialPort.Write(cmd); serialPort.Close(); success = true; } catch // may not need a try/catch block, as success defaults to false { success = false; } return success; } ...now I need to read a value returned from a "get val" call, but I don't know how, and I haven't been able to

Power On/Off GPRS on windows mobile

ε祈祈猫儿з 提交于 2019-12-06 15:26:14
i'm looking for a way to power on or off the GPRS adapter programatically. If you're already using the Smart Device Framework , the ability is already there in the API, as you can see in this blog entry (the blog is for WiFi but the phone radio and bluetooth work the same way). THe other option is to call ChangeRadioState in ossvcs.dll yourself (that's what the SDF is doing). 来源: https://stackoverflow.com/questions/1164057/power-on-off-gprs-on-windows-mobile

Setting Windows Mobile device system time from computer?

六眼飞鱼酱① 提交于 2019-12-06 15:18:58
问题 I'm trying to sync the system date and time of a device to the desktop it's docked to, I'm working through compact framework (C#). My goal is to detect when the last time the device was synced to a database on the desktop machine was. How can I do this? 回答1: I am not sure what the final question is. If you ask, how to sync the time of the device with the PCs time when the device is dockked, then you can use the free ITSUtils and some registry change on your PC to automate time snycing: The

sql ce native exception 0xc0000005

夙愿已清 提交于 2019-12-06 15:09:55
When i run my .net 3.5 cf application that reads some data from ms sql ce, sometimes i get an native exception with the following info: ExceptionCode: 0xc0000005 ExceptionAddress : 0x44746e65 (variable) Reading: 0x44746e64 at NativeMethods.GetKeyInfo(IntPtr pTx, String pwszBaseTable, IntPtr prgDbKeyInfo, Int32 cDbKeyInfo, IntPtr pError) at SqlCeCommand.ExecuteReader(CommandBahavior behavior) (... omitted for brevity) at dadosGpsTableAdapter.GetDadosAEnviar() My GetDadosAEnviar query is very simple: SELECT _id, Latitude, Longitude, Ignicao, Altitude, Velocidade,Direcao, Qualidade, Timestamp,

Compact Framework - get all open forms

旧城冷巷雨未停 提交于 2019-12-06 14:32:15
问题 I am making a Windows CE application in which the user can change the GUI language at runtime. I have implemented my own translation logic in the Load event of the form. Now, I would like to update all open forms when the user changes the language. Is there a way (in Compact Framework!!) to retrieve all open forms of the application? 回答1: You can create a FormManager class that you use to instantiate all of your forms. This would give the manager the opportunity to track the lifespan of those

developing applications for windows mobile,c#

雨燕双飞 提交于 2019-12-06 14:19:00
i work on visual studio 2008,now i want to create applications for windows mobile in c#. what r d requirements and how to build them??? Do i need any kind of simulators Answering your question with right degree of detailing that it deserves is beyond the scope here. So I recommend you to start from here ! Windows Mobile Developer Center There is a Windows Mobile SDK available for free from Microsoft, however you must use a full version of Visual Studio (not an Express edition). Brian Sweeney You can now use Visual Studio 2010 express mobile edition as well. This is nice because it seems to be

Moving Picture box with timer faster

喜夏-厌秋 提交于 2019-12-06 11:33:44
问题 I have a project in Compact framework 2.0 C# I am using a lot of picturebox in Form and there is a timer to change the location of pictureboxs every second but moving is very slowly how can I make faster it? Timer interval is 100 private void timer1_Tick(object sender, EventArgs e) { picust.Location = new Point(picust.Location.X, picust.Location.Y + 10); picx.Location = new Point(picx.Location.X, picx.Location.Y + 10); picy.Location = new Point(picy.Location.X, picx.Location.Y + 10); } 回答1: