views:

37

answers:

0

Hey,

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.

related questions