如何在 C# (.NET Compact Framework) 中隐藏沙漏图标
有谁知道当您执行另一个应用程序时如何隐藏沙漏图标?
例如,具有漂亮背景屏幕的 App-A 启动 App-B。 当 App-B 加载窗口时,会将这个丑陋的带有旋转沙漏的灰色块放在 App-A 的中间。
我尝试过调用 System.Windows.Forms.Cursor.Hide(); 但这似乎并没有阻止Windows。 有可能是我没有正确使用它。 任何想法都非常受欢迎。
TIA(提前致谢),
结束
does anyone have an idea how to hide the hourglass icon when you execute an application from another?
E.g. App-A with pretty background screen starts App-B. While App-B is loading windows puts this ugly grey block with the rotating hourglass in the middle of App-A.
I have tried calling System.Windows.Forms.Cursor.Hide(); but that did not seem to deter windows. It is possible that I did not use it correctly. Any ideas most welcome.
TIA (Thanks in Advance),
Ends
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
事实上,您将其称为“沙漏”,这表明我这不是 Windows Mobile 设备,而是通用 CE 设备。 不幸的是,CF 加载程序告诉操作系统在启动时显示沙漏,从 CF 的角度来看,实际上没有办法阻止这种情况。 如果您控制操作系统,您可以在操作系统本身中完全删除沙漏光标,但您无法阻止 CF 显示它(如果它存在)。
The fact you're calling it an "hourglass" indicates to me that this is not a Windows Mobile device but instead a generic CE device. Unfortunately the CF loader tells the OS to display the hourglass when it starts up and there is actually no way to prevent that from a CF perspective. You can remove the hourglass cursor altogether in the OS itself if you control the OS, but you can't prevent the CF from showing it if it's there.
您是否尝试将
Cursor.Current
属性设置为 Cursors toCursors.Default
?您可以在此处找到此属性的文档MSDN 和此处的光标类< /a>.
Did you try to set the
Cursor.Current
property to Cursors toCursors.Default
?Here you can find the documentation for this property on MSDN and for the Cursor class here.
您是否尝试过在 App A 启动 App B 之前调用 Cursor.Hide ,然后在窗口完成加载后取消隐藏它?
Have you tried calling Cursor.Hide before App A starts App B and then unhiding it after the window finishes loading?
我想这可能就是您正在寻找的:
http://www.cprogramdevelop.com/1695088/
I think this might be what you are looking for:
http://www.cprogramdevelop.com/1695088/