如何在 Windows Mobile 6 上获取"busy wheel"?
How do I get a "busy wheel" on Windows Mobile 6?
当事情发生时,Windows Mobile会弹出一个"忙碌的轮子"——一个旋转的彩色磁盘。我在文档中找不到这是如何做到的——有人能给我指明正确的方向吗?
我们有一种情况,我们需要提示用户说我们正在做一段时间的事情,但我们不知道需要多长时间。所以我们不能做进度条,因此建议使用这个繁忙的轮子。
使用SetCursor/LoadCursor/ShowCursor API,如下所示:
SetCursor(LoadCursor(NULL, IDC_WAIT));
// my code
ShowCursor(FALSE);
使用compactframework。
转轮:
System.Windows.Forms.Cursor.Current=System.Windows.Fforms.Cursors.WaitCursor;
恢复正常:
System.Windows.Forms.Cursor.Current=System.Windows.Fforms.Cursors.Default;
我只是猜测这里,但我想它是CWaitCursor。基本上,你只需在堆栈上创建一个,它就会出现,当它超出范围时被破坏时就会消失,例如
void DoSomethingSlow()
{
CWaitCursor cw;
.
.
.
.
}
来源:http://mobiledeveloper.wordpress.com/2006/07/05/wait-cursor/
查看Cursor.Current=Cursors.WaitCursor;
try {
Cursor.Current = Cursors.WaitCursor;
//Do something time consuming…
}
finally {
Cursor.Current = Cursors.Default;
}
相关文章:
- C++为构建时间获取QDateTime的可靠方法
- lambda参数转换为constexpr技巧,然后获取带链接的数组
- 如何使用 < 和 > 命令获取 c++ 中的输入和输出?
- 使用指针从C++中的数组中获取最大值
- 如何获取std::result_of函数的返回类型
- 如何在openssl-ecc中获取十六进制格式的私钥
- 使用Unreal C++获取VR耳机的世界位置/方向
- 获取日期异步信号安全吗?如果在信号处理程序中使用,它会导致死锁吗
- 从C字符串中获取奇怪的字符串长度
- 为什么我的for循环不能正确获取argv
- 从python中调用C++函数并获取返回值
- 如何获取一个数字的前3位
- 获取字符串的长度并将其分配给数组
- 无法获取菜单选择以运行函数.C++
- 数组长度,为什么从命令行获取时不能使用它?
- Boost Spirit,获取迭代器内部语义动作
- 尝试通过OCI例程从Oracle获取blob数据,但出现错误:ORA-01008:并非所有变量都绑定
- 具有默认值的引用获取函数
- xmake总是报告:错误:无法获取cxx的程序,为什么
- 如何在 Windows Mobile 6 上获取"busy wheel"?