显示“加载屏幕";在加载对话框表单时? [英] Showing a "Loading Screen" while Loading Dialog Form?

查看:68
本文介绍了显示“加载屏幕";在加载对话框表单时?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,
我想在主窗体上打开dilaog窗体时显示一个带有正在加载的文本的小面板.例如;我的应用程序上有一个MainForm,还有一个用于编辑记录的DialogForm.当单击MainForm上的Edit按钮时,我将数据加载到DialogForm(对话框窗口)中.因此,加载此DialogForm的数据需要1-2秒.因此,我试图有条不紊地执行此过程.

1号我想禁用MainForm,
第二个>我想显示一个带有示例文本的小面板,例如"Loading ...",直到DialogForm打开.
第三>当DialogForm打开时,面板应该是不可见的,并且在DialogForm关闭之前,MainForm仍将处于禁用状态.

现在,有一些方法可以做到这一点(只需更改面板的visible-invisible属性,BackgroundWorker等).但是,我想应用最适当和合乎逻辑的方法来实现这一目标.我应该怎么做?你能举个例子吗?
BR

Hi all,
I want to show a little panel with a loading... text on it while opening a dilaog form on the main form. For example; there is a MainForm on my application and a DialogForm used for editing a record. When clicking Edit button on the MainForm, I load the data to the DialogForm (dialog window). So, there is 1-2 second to loading this DialogForm''s data. For this reason I have tried to do this process orderly;

1st > I want to disable the MainForm,
2nd > I want to show a little panel with a sample text like "Loading..." until the DialogForm opens.
3rd > When DialogForm opens, the panel should be invisible and the MainForm is still disabled until the DialogForm closed.

Now, there is some way to do this (by simply changing the panel''s visible-invisible property, BackgroundWorker, etc.). However, I want to apply the most appropriate and logical method to achieve that. How should I do this? Could you give an example please?
BR

推荐答案

对话框中有两个Panels(或您选择的控件).一个面板将包含编辑所需的所有控件,另一个面板可以包含Label,用于显示正在加载..."消息,也可以将文本直接绘制到面板上.

对话框首次加载时,使正在加载"面板可见,并隐藏另一个面板.加载数据后,立即使数据"面板可见,并隐藏正在加载"面板.

另外,您也可以在Statusbar中使用Progressbar表示正在加载数据.
Have two Panels (or a control of your choice) on your Dialog. One panel will hold all the controls required for the editing and the other can contain a Label, for the "Loading......" message or you can draw the text directly onto the panel.

When the dialog first loads make the ''Loading'' Panel visible and hide the other one. As soon as the data is loaded make the ''Data'' Panel visible and hide the ''Loading'' one.

Alternatively you can use a Progressbar, possibly in a Statusbar, to indicate that data is loading.


1.创建一个用于弹出的CSS.
2.然后从工具栏上获取图像,将其源添加到加载数据的.gif文件中(您可以在google图像中轻松获得该图像).
3.在< asp:image xmlns:asp =#unknown">中添加CSS类.标记.
1. create a CSS which is used for poping up.
2. then take a image from toolbar add its source to some .gif file of loading data(u can get that easily in google images).
3. add css class in that <asp:image xmlns:asp="#unknown"> tag.


如果使用的是VS 2008 SP1或更高版本.您可以非常轻松地使用启动画面..
http://msdn.microsoft.com/en-us/library/cc656886.aspx [ ^ ]
If you are using VS 2008 SP1 or later. you can use splash screen very easily..
http://msdn.microsoft.com/en-us/library/cc656886.aspx[^]


这篇关于显示“加载屏幕";在加载对话框表单时?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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