正在加载大量数据以显示一些等待图像和时间 [英] Onloading huge data to show some wait image and time

查看:74
本文介绍了正在加载大量数据以显示一些等待图像和时间的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

我想将大量的数据(如100000条记录)加载到datagridview中.在两次数据加载之间,我想显示一些图像或表格....

在此先感谢
KNR.

Hello all,

I want load huge data like 100000 records into datagridview. In between dataloading i want to show some image or form....

Thanks in advance
KNR.

推荐答案

您可以使用后台工作程序 ^ ]


http://msdn.microsoft.com /en-us/library/system.componentmodel.backgroundworker.aspx [ ^ ]
You can use background worker http://msdn.microsoft.com/en-us/library/cc221403(v=vs.95).aspx[^]


http://msdn.microsoft.com/en-us/library/system.componentmodel.backgroundworker.aspx[^]


1.当心memoryoutofbounds异常.
2.我认为您需要查看BackgroundWorker类.
3.对于启动画面",您可以创建一个对话框并删除所有窗口标题和控制按钮(关闭,最小化...).将大小设置为固定.在该对话框上,添加一个图片框(或类似控件)并将其最大化(在winform基座填充中).开始加载时,请在启动屏幕对话框上调用Show或ShowDialog方法,加载完成后调用Close方法.

希望这会有所帮助.
1. watch out for memoryoutofbounds exceptions.
2. I think you need to look at the BackgroundWorker class.
3. For the "Splashscreen" you can create a dialog and remove all window titles and control buttons (close, minimize, ...) Set the size to fixed. On that dialog you add a picturebox (or similar control) and maximize it (in winform dock fill). When you start loading you call Show or ShowDialog method on your splashscreen dialog and the Close method when loading is finished.

Hope this helps.


这篇关于正在加载大量数据以显示一些等待图像和时间的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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