我正在基于windows CE的扫描仪设备上开发一个compact Framework3.5应用程序。当我调用When服务时,我想用以下命令显示等待光标
Cursor.Current = Cursors.WaitCursor;这可以很好地工作。但是,当我尝试使用以下语句将游标重置为其缺省状态时
Cursor.Current = Cursors.Default;对于这个堆栈跟踪,我总是得到一个未指明的未处理的异常:
bij Microsoft.AGL.Common.MISC.HandleAr(PAL_ERROR ar)
bij System.Windows.Forms.Cursor.set_Current(Cursor value)
bij AppName.MainForm.btnSearch_Click(Object sender, EventArgs e)
bij System.Windows.Forms.Control.OnClick(EventArgs e)
bij System.Windows.Forms.Button.OnClick(EventArgs e)
bij System.Windows.Forms.ButtonBase.WnProc(WM wm, Int32 wParam, Int32 lParam)
bij System.Windows.Forms.Control._InternalWnProc(WM wm, Int32 wParam, Int32 lParam)
bij Microsoft.AGL.Forms.EVL.EnterMainLoop(IntPtr hwnMain)
bij System.Windows.Forms.Application.Run(Form fm)
bij AppName.Program.Main()我在一个纯智能设备项目中使用了单击事件的形式,但即使这样也会发生这种情况。当我在windows mobile设备模拟器中运行应用程序,而不是在真正的CE设备上运行时,它运行得很好。
这会不会是设备本身的一个限制?让我大吃一惊的是,这么简单的代码竟然不能工作。Windows CE的内置应用程序可以很好地使用等待游标。
谢谢你的点子。
发布于 2010-11-19 01:26:21
通过更新设备上的操作系统解决了此问题。
https://stackoverflow.com/questions/3410683
复制相似问题