禁用鼠标和键盘 [英] disable mouse and keyboard

查看:95
本文介绍了禁用鼠标和键盘的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

亲爱的朋友们,


我有一个命令按钮,点击后会运行数十个查询,数百万次计算等。


此过程每次大约需要10秒钟,鼠标指针会快速变为沙漏并在此过程中变回指针。


如果用户打开其他表单做其他事情而主要计算尚未完成,结果将是灾难。因此,我希望在开始计算之前通过禁用鼠标和键盘 撤防用户,并在完成计算后重新启用它们。



可能???????????????

Dear friends,

I have a command button that when clicked, runs tens of queries, millions of calculations, etc.

This process takes about 10 seconds each time, and the mouse pointer rapidly changes into hourglass and changes back to pointer during this process.

If the user opens other forms or does other things while the main calculations are not finished yet, the results would be disaster. So I want to disarm the user by disabling mouse and keyboard before starting calculations, and re-enable them after finishing the calculations.


Possible???????????????

推荐答案

使用命令按钮制作表单Modal会阻止其他窗户被打开了。只需禁用该表单上的其他控件,直到操作完成。
Making the form with the command button Modal would prevent other windows from being opened. Just disable other controls on that one form until the operations are complete.


一些计算在表单关闭后完成,并且没有表单打开。

我需要更多的"""""""可靠的"""""""方式!!!!
some of the calculations are done after the form is closed, and no form is open.

I need a more """""""reliable"""""""" way!!!!


如果您不希望用户做任何事情,为什么要关闭表单?只需显示请等待或进度条等消息。
Why do you close the form if you don''t want the user doing anything? Just display a message saying Please Wait, or a progress bar, or something.


这篇关于禁用鼠标和键盘的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆