Cursor.Current = Cursors.Default 异常;

发布于 2024-09-12 18:05:56 字数 1052 浏览 2 评论 0原文

我正在基于 Windows CE 的扫描仪设备上开发一个紧凑框架 3.5 应用程序。当我调用网络服务时,我想显示等待光标,

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 移动设备模拟器中而不是在真正的 CE 设备上运行该应用程序时,它运行良好。

这可能是设备本身的限制吗?我非常惊讶如此简单的代码不起作用。 Windows CE 的内置应用程序与等待光标配合得很好。

感谢您的任何想法。

I'm developing a compact framework 3.5 application on a windows CE based scanner device. When I'm calling a webservice I'd like to display the wait cursor with

Cursor.Current = Cursors.WaitCursor;

This works fine. However when I try to reset the cursor to its default state with the statement

Cursor.Current = Cursors.Default;

I always get an unspecified unhandled exception with this stacktrace:

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()

I tried this in a completely vanilla smart device project in the form click event but even then this occurs. When I run the application in a windows mobile device emulator instead of on the real CE device it runs fine.

Could this be a limitation of the device itself? I'm pretty flabbergasted that such simple code doesn't work. And the built in applications of Windows CE work fine with wait cursors.

Thanks for any ideas.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

森林散布 2024-09-19 18:05:56

通过更新设备上的操作系统解决了此问题。

This problem was solved with an update of the OS on the device.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文