Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to BackGroundWorker change label.text
Message
From
16/12/2010 02:24:51
 
 
To
All
General information
Forum:
ASP.NET
Category:
Coding, syntax and commands
Title:
How to BackGroundWorker change label.text
Environment versions
Environment:
VB 9.0
OS:
Windows XP
Database:
MS SQL Server
Miscellaneous
Thread ID:
01492852
Message ID:
01492852
Views:
216

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

Next
Reply
Map
View

Click here to load this message in the networking platform