定时器事件改变光标
我有一个计时器事件,每 5 秒更新我的应用程序中的某些内容(来自 PHP 服务)。每次这个计时器滴答作响时,它都会使光标闪烁到时钟,然后返回到箭头。由于这种情况每 5 秒发生一次,因此非常烦人。有没有办法防止计时器在计时时光标发生变化?
更新:我已经通过设置具有高优先级的自定义光标找到了解决方法(我刚刚制作了一个带有光标的.png)。这可行,但光标移动似乎不像平常那样顺利。有人知道更好的解决方案吗?
I have a timer event that updates certain things in my app (from a PHP Service) every 5 seconds. Every time this timer ticks, it makes the cursor blink to a clock and then back to the arrow. Since this is happening every 5 seconds, it gets pretty annoying. Is there a way for me to prevent the cursor from changing when the timer ticks?
UPDATE: I've figured out a work-around by setting a custom cursor with high priority (I just made a .png with a cursor in it). This works, but the cursor doesn't seem to move as smoothly as normal. Anyone know of a better solution?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我重复我的评论作为答案,因为它解决了您的问题,并添加了一些细节。当您使用数据连接向导时,showBusyCursor 的默认标志为“true”,为了防止出现这种情况,您需要将此设置更改为“false”。
我不确定 FB4 向导会构建什么,因为我仍在使用 FB3,但如果它类似于 mxml httpService,您只需要在 .mxml 文件中找到该服务,您就会看到该属性。
现在跟我重复一遍。 “所有程序员都会犯愚蠢的错误,尤其是当我们使用新语言时,我并不比其他程序员更白痴”如果一年后你回顾你的代码并且不对自己说“我做了什么”思考“那么你可能做错了什么。
I'm repeating my comment as an answer since it solved your issue, and adding a bit of detail. When you use the Data Connection wizard the default flag for showBusyCursor is "true" in order to prevent it you need to change this setting to "false".
I'm not sure what the FB4 wizard builds since I'm still using FB3, but if it's similar to the mxml httpService you just need to find the service in the .mxml file and you will see that attribute.
Now repeat after me. "All programmers make silly mistakes, especially when we are using new languages, I am no more of a moron than any other programmer" If, in a year, you look back on your code and don't say to yourself "what was I thinking" then you're probably doing something wrong.