完成加载后显示表格吗? [英] show form when complete load?

查看:66
本文介绍了完成加载后显示表格吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的主窗体在加载时需要一段时间才能完成显示

my main form when load have It takes a while to Complete show
how i can when form Complete ,show it?

推荐答案

请参阅我对问题的评论.
显然,您已经在显示表单之后执行了一些操作.有时您确实需要它.

解决这种情况的通常方法是使用启动画面".

您将在CodeProject文章中找到很多代码: http://www.codeproject.com/search.aspx?doctypeid=1&q=%22splash+screen%22+%22C%23%22 [ http://en.lmgtfy.com/?q =%22splash + screen%22 +%22C%23%22 + Forms [
Please see my comment to the question.
You apparently do something after the form is already shown. Sometimes you really need it.

The usual way to handle this situation is using the "splash screen".

You will find a lot of codes in CodeProject articles: http://www.codeproject.com/search.aspx?doctypeid=1&q=%22splash+screen%22+%22C%23%22[^].

Search also with Google: http://en.lmgtfy.com/?q=%22splash+screen%22+%22C%23%22+Forms[^].

--SA


只需添加SA给您的答案-在表单准备好完全显示之前,让用户完全不显示是个好主意.这使用户怀疑他是否真的激活了该应用程序,并且他们倾向于一次又一次地尝试.

您应该在第一秒左右的时间内显示某物,无论是局部显示还是启动屏幕,只是为了向用户保证发生了什么事情.

如果您的表单加载缓慢,则取决于如何显示/填充表单以及如何加快处理速度.例如,如果您要从数据库中将大量数据加载到DataGridView中,那可能就是所有问题,更好的解决方案可能是将加载代码移到单独的线程或页面中您的显示器.这完全取决于您显示的内容,以使其更快!
Just to add to the answer SA gave you - it is not a good idea to leave teh user with no display at all until the form is ready to fully display. This make teh user doubt if he actually activated the application at all, and they tend to try again, and again, and again.

You should aim to display something in the first second or so, be it a partial form or a splash screen, just to reassure the user that something is happening.

If you form is loading slowly, it will depend on what you are showing / filling it with as to how it is possible to speed the process up. If you are (for example) loading a lot of data from a database into a DataGridView, that could be the problem all on it''s own, and a better solution may be to move the load code into a separate thread, or page your display. It all depends on what you display how you make it faster!


这篇关于完成加载后显示表格吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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