显示光标 [英] Display of cursor
问题描述
我想就旋转光标的显示提出一些建议。
Hi,
I would like a bit of advice regarding the display of the rotating cursor.
我的应用是在Windows Mobile 6.我试图在更新数据库时显示旋转光标。
My application is on Windows Mobile 6. I am trying to display the spinning cursor whilst updating a database.
我使用以下代码片段来显示和清除错误:
I am using the following code snippet to display and clear the cusror:
public static void Show(bool value)
{
WinApi.SetCursor(value ? WinApi.LoadCursor(0, WinApi.IDC_WAIT) : 0);
}
在更新a的方法之前调用此方法数据库。数据库更新将记录的数据记录复制到数据库表中:
This method is called prior to a a method that updates a database. The database update copies data record for record to the database table in a tight loop:
// Write each of the avlist items to the avdetTable table
foreach (DataRow rowDetail in this.dtAvListDetail.Rows)
{
Application.DoEvents();
Global.Data.Local.InsertAvListDetail(rowDetail);
}
光标显示并清除确定,但显示时不会旋转。
任何人都可以对这个问题有所了解,非常感谢。
The cursor is displayed and is cleared Ok, but when displayed it does not rotate.
Can anyone throw some light on this issue,
many thanks.
推荐答案
你的代码看起来是C#,如果是,请使用下面的代码。
Hi,
your code looks C#, if yes use the following code.
Cursor.Current = Cursors.WaitCursor;
Cursor.Current = Cursors.Default;
显示等待光标: 显示默认光标 这篇关于显示光标的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
光标
光标 。当前= 光标 。默认值;