防止事件期间屏幕闪烁
大家好,我知道在 vb 的原始版本中(如 Excel 中所示),您可以插入一行以防止屏幕在尝试处理某些内容时来回闪烁。
Application.screenupdating = false
我目前在 Visual Studio 2008 中使用 vb.net,但我想知道是否有人知道该版本的等效项。它无法识别使用 vb.net 的 VS 2008 中的此调用。任何帮助,将不胜感激! 预先感谢各位!
Hey guys, I know that in primitive versions of vb (as found in excel) there was a line that you could insert to prevent screens from flickering to and fro when it is trying to process something.
Application.screenupdating = false
I am currently using vb.net in Visual Studio 2008 but i was wondering if anyone knows the equivilent for this version. It doesnt recognise this call in VS 2008 using vb.net. Any help would be appreciated!
Thanks in advance guys!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
取决于控制。很多控件(例如 ListView)都有 BeginUpdate 和 endUpdate 方法来实现这一确切目的。
Depends on control. Quite a lot of controls (e.g. ListView) have BeginUpdate and endUpdate methods that server that exact purpose.
SuspendLayout 和 ResumeLayout 方法应该可以解决问题。 SuspendLayout 会阻止控件/窗体重新绘制自身,直到您调用 ResumeLayout 方法。
The SuspendLayout and ResumeLayout methods should do the trick. SuspendLayout prevents a control/form from redrawing itself until you call the ResumeLayout method.
Globals.ThisWorkbook.Application.ScreenUpdating = False
Globals.ThisWorkbook.Application.ScreenUpdating = False
回复:当它尝试处理某些内容时,
您可以禁用该表单
re: when it is trying to process something
you can disable the form