以下是在多线程中显示进度条代码
'定义一个委托
Delegate Sub dl_ShowProgress(ByVal iValue As Integer)
Public Sub ShowProgress(ByVal iValue As Integer)
If ProgressBar1.IsDisposed Then
Return
End If
If ProgressBar1.InvokeRequired = True Then
Dim pInvoke As New dl_ShowProgress(AddressOf ShowProgress)
Me.Invoke(pInvoke, New Object() {iValue})
Else
ProgressBar1.Value = iValue
ProgressBar1.Refresh()
End If
End Sub
'在多线程中调用ShowProgress(*)函数
本文如未解决您的问题请添加抖音号:51dongshi(抖音搜索懂视),直接咨询即可。