表格加载时间太长 [英] form take too time to load the form

查看:73
本文介绍了表格加载时间太长的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的vb.net表单具有许多控件.加载表单花了太多时间.有什么解决方案可以减少加载时间...

My vb.net form has many controls. It take too time to load form. Is there any solution to reduce the loading time...

推荐答案

减少控件的数量.

如果有太多因素会影响加载时间,那么您需要从用户的角度来看待它,然后开始将其中一些移出主显示屏-您只能获取很多信息一次!

值得一看的是,您对这些控件的处理方式-例如,如果它们都是数据绑定的,那么您需要确保您不会针对每个控件都去数据库,也不要加载未使用的信息
Reduce the number of controls.

If you have so many that it is affecting the load time, then you need to look at it from a users'' point of view and start moving some of them out of the main display - there is only soi much information you can take in at one time!

It may be worth looking at what you are doing with those controls - if they are all databound for example, then you need to make sure that you are not making a trip to the DB for every control, or loading information you don''t need.


创建一个.INI文件并设置要显示的控件.比放入数据库更好.

我有一些用于开发项目的示例.通过使用配置文件.这意味着动态(值可以更改)数据,例如分支代码,分支ID,付款类型,商人.

[MERCHANT]
SPLITTER =,
; 0-启用商家,1-禁用商家
MERCH1 = 0,CU,创建用户
MERCH2 = 0,DU,DELETE USER
MERCH3 = 0,CJ,创建作业

然后将值加载到可用于整个过程的属性中.就这样

那是我的建议.如果要使用此功能,我将解释如何使用.那是我对你的想法:)
Create one .INI file and set the control you want to be appear. Better than you put into database.

I have some example that used to develop my project. It''s by using configuration file. Which mean something that dynamic (value can be change) data such as Branch Code, Branch ID,Payment Type,Merchant.

[MERCHANT]
SPLITTER=,
;0 - Enable Merchant, 1 - Disable Merchant
MERCH1=0,CU,CREATE USER
MERCH2=0,DU,DELETE USER
MERCH3=0,CJ,CREATE JOB

Then load the value into property that can be use to whole process. Just like that

That''s my recommendation. If you want to use this, I will explain how. That''s my idea for u :)


这篇关于表格加载时间太长的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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