在vb.net windows应用程序中加载屏幕 [英] Loading screen in vb.net windows application
本文介绍了在vb.net windows应用程序中加载屏幕的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
私有 Sub Button1_Click( ByVal sender As System。 Object , ByVal e As System.EventArgs)句柄 Button1.Click
add ()
结束 Sub
私人 Sub add()
对于我作为 整数 = 0 至 200000
Label1.Text = I
下一步
结束 Sub
对于此代码,当标签更新时,我需要一个弹出窗口显示加载,直到完成过程可以任何身体帮助我该怎么做
解决方案
Hello Mose,我认为你需要使用多线程在表单加载上显示一些进度条。请点击此处链接。 />
无论如何,我们为您的问题提供快速解决方案。检查以下代码。
私有 Sub button1_Click( ByVal sender 作为 对象, ByVal e As EventArgs)
ShowProgress()
结束 Sub
私有 Sub ShowProgress()
对于 i As 整数 = 0 至 2000
label1.Text = i.ToString()
Application.DoEvents()
Next
结束 子跨度>
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
add()
End Sub
Private Sub add()
For I As Integer = 0 To 200000
Label1.Text = I
Next
End Sub
For this code while the label is updating I need a popup to be displays that shows loading until the process completed can any body help how can i do that
解决方案
Hello Mose, I think you need to show some progressbar on your form load using multithreading. Check the link here.
Anyway we have the quick solution for your issue. Check the below code.
Private Sub button1_Click(ByVal sender As Object, ByVal e As EventArgs) ShowProgress() End Sub Private Sub ShowProgress() For i As Integer = 0 To 2000 label1.Text = i.ToString() Application.DoEvents() Next End Sub
这篇关于在vb.net windows应用程序中加载屏幕的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文