how can i do that
tried alot of methods online but is mostly for windows mobile...not pocket PC....
tried system.status, but dunno y got the "WindowsMobile.Utilities" not found exception...
Hope some1 can reply soon...lol
how can i do that
tried alot of methods online but is mostly for windows mobile...not pocket PC....
tried system.status, but dunno y got the "WindowsMobile.Utilities" not found exception...
Hope some1 can reply soon...lol
Hi,
Losely speaking Windows Mobile is simply later editions of Pocket PC.
If you are using a Windows Mobile 2005 (or higher) device you should be able to use the following code to detect the presence of a cradle (don't forget to include references to Microsoft.WindowsMobile and Microsoft.WindowsMobile.Status assemblies).
using Microsoft.WindowsMobile.Status;
if (SystemState.CradlePresent)
MessageBox.Show("Cradle is present");
else
MessageBox.Show("Cradle is not present");This property is documented on MSDN here http://msdn2.microsoft.com/en-us/library/microsoft.windowsmobile.status.systemstate.cradlepresent.aspx
If you are using a pre Windows Mobile 2005 device the situation is a little more tricky, as far as I am aware there is no officially documented technique to detect the situation, except for things such as using CeRunAppAtEvent (http://msdn2.microsoft.com/en-us/library/ms913956.aspx) to wake your application when the NOTIFICATION_EVENT_RS232_DETECTED event occurs and this is not as neat as simply querying a boolean property.
There is a good forum posting on this second technique including ways to call this API from C# or VB.NET available here http://www.opennetcf.org/forums/topic.asp TOPIC_ID=783. This post also includes references to a pre-written wrapper available as part of OpenNETCF
MSDN also contains an article which contains a wrapper for this function to detect activesync syncronisations available here http://msdn2.microsoft.com/en-us/library/aa446536.aspx.
Thanks,
Christopher Fairbairn
Hi,
As far as I am aware this registry key is only supported on Windows Mobile 5.0 or above devices.
I am assuming the reason why the original poster is getting an ""WindowsMobile.Utilities" not found exception, is because they are using a pre Windows Mobile 2005 device, and hence this registry key will not be present.
Thanks,
Christopher Fairbairn