Visual Studio 2010 Windows窗体应用程序screenupdating属性 [英] visual studio 2010 windows forms app screenupdating property

查看:92
本文介绍了Visual Studio 2010 Windows窗体应用程序screenupdating属性的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是.NET开发的新手,有一个简单的问题,我坚持了一段时间,并首先搜索了很多没有解决方案的论坛,所以我发布了自己的信息.在VB for excel中,我使用Screenupdating = false来禁用屏幕更新,但是现在我正在创建Visual Studio 2010 Windows窗体应用程序,并且该应用程序未显示为属性.这是我尝试过的代码.

Hi i''m a noob to .NET developing and have a simple question, i''ve been stuck on this for a while and searched many forums first with no solution so i''m posting myself. In VB for excel i''ve used Screenupdating=false to disable the screen updating however now i''m creating a visual studio 2010 windows forms application and its not showing up as a property. Here is the code i''ve tried.

Public Class
Public Sub Welcome_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        Application.screenupdating = False
End Sub
End Class



而且我收到错误"screenupdating"不是"system.windows.forms.application"的成员.



And i get the error ''screenupdating'' is not a member of ''system.windows.forms.application''.
Thanks.

推荐答案

那是因为screenupdating仅在Office中可用:它不是.NET的一部分

想一想:它可以防止大量的文件加载操作使屏幕充满更新.由于.NET应用程序可以执行其喜欢的任何操作,因此它无法分辨出什么是大规模的文件操作.相反,它为诸如TreeView之类的单个控件提供了BeginUpdateEndUpdate方法,它们可以做很多相同的事情,但是目标更精确.
That''s because screenupdating is only available in Office: it is not a part of .NET

Think about it: It is there to prevent massive file load operations swamping the screen with updates. Since .NET applications can do anything they like, it can''t tell what is a massive file operation. Instead, it provides BeginUpdate and EndUpdate methods for individual controls such as TreeView to do much the same thing, but more accurately targeted.


这篇关于Visual Studio 2010 Windows窗体应用程序screenupdating属性的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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