i can't change the Label1.Text in ProgressChanged
i think change the Label1.Text and excute sql and ProgressBar1 in same time... like update software
update function is a sql , excute sql is more time to hang computer , ProgressBar1 is ok , but test is not ok ....
Private Sub BackgroundWorker1_ProgressChanged(ByVal sender As System.Object, ByVal e As System.ComponentModel.ProgressChangedEventArgs) Handles BackgroundWorker1.ProgressChanged
update()
End Sub
Private Function update()
Label1.Text = "update the masterfile"
Me.ProgressBar1.Value = 10
sql statement......finish
Label1.Text = "update the materfile finish"
Me.ProgressBar1.Value = 20
Label1.Text = "update the itemfile"
Me.ProgressBar1.Value = 30
sql statement......finish
Label1.Text = "update the itemfile finish"
Me.ProgressBar1.Value = 100
end sub