English 中文(简体)
• 在2003年移动视窗的摇篮中发现一台Pocket PC
原标题:Detecting when a Pocket PC is docked in a cradle in Windows Mobile 2003

在使用C#的Windows 2003号移动式电梯中,Pocket Pc装置被打碎时,可以发现。

我想,当这一装置被收回时,它就叫上网络服务。

最佳回答

答案是什么。

http://social.msdn.microsoft.com/Forums/en-US/vssmartdevicesnative/thread/d7e6d896-0b-4bb8-69d-3516b <8682/6782>

开放式数据库为监测主动联系状况提供了一个途径。 同以下守则一样:

private void connectAsync_Click(object sender, System.EventArgs e)
                {
                        m_rapi.RAPIConnected += new RAPIConnectedHandler(m_rapi_RAPIConnected);
                        m_rapi.RAPIDisconnected += new RAPIConnectedHandler(m_rapi_RAPIDisconnected);
                        m_rapi.Connect(false, -1);
                }

                private void m_rapi_RAPIConnected()
                {
            this.Invoke(textUpdate, new object[] { this, new TextArgs(connectStatus, "Connected") });
            this.Invoke(enableUpdate, new object[] { this, new EnableArgs(connectAsync, false) });
            this.Invoke(enableUpdate, new object[] { this, new EnableArgs(connectSync, false) });
                }

                private void m_rapi_RAPIDisconnected()
                {
            this.Invoke(textUpdate, new object[] { this, new TextArgs(connectStatus, "Not Connected") });
            this.Invoke(enableUpdate, new object[] { this, new EnableArgs(connectAsync, false) });
            this.Invoke(enableUpdate, new object[] { this, new EnableArgs(connectAsync, false) });
                }



                 private void copyFrom_Click(object sender, System.EventArgs e)

                {
                        if(! m_rapi.Connected)
                        {
                                MessageBox.Show("Not connected!");
                                return;
                        }

                        m_rapi.CopyFileFromDevice("f:\1.jpg", "\My Documents\1.jpg", true);

                }

While detecting it is connection, it will change the status as "connected".

For more information: http://social.msdn.microsoft.com/forums/en-US/vssmartdevicesvbcs/thread/44e50105-a0ec-4906-86f8-42c8215b6993/

外交部 - 管理投资

问题回答

暂无回答




相关问题
Anyone feel like passing it forward?

I m the only developer in my company, and am getting along well as an autodidact, but I know I m missing out on the education one gets from working with and having code reviewed by more senior devs. ...

NSArray s, Primitive types and Boxing Oh My!

I m pretty new to the Objective-C world and I have a long history with .net/C# so naturally I m inclined to use my C# wits. Now here s the question: I feel really inclined to create some type of ...

C# Marshal / Pinvoke CBitmap?

I cannot figure out how to marshal a C++ CBitmap to a C# Bitmap or Image class. My import looks like this: [DllImport(@"test.dll", CharSet = CharSet.Unicode)] public static extern IntPtr ...

How to Use Ghostscript DLL to convert PDF to PDF/A

How to user GhostScript DLL to convert PDF to PDF/A. I know I kind of have to call the exported function of gsdll32.dll whose name is gsapi_init_with_args, but how do i pass the right arguments? BTW, ...

Linqy no matchy

Maybe it s something I m doing wrong. I m just learning Linq because I m bored. And so far so good. I made a little program and it basically just outputs all matches (foreach) into a label control. ...

热门标签