My backgroundWorker doWork
's event has many codes to execute.Is it possible to change the label text after each code is executed ?
For example :
Dim con As New SqlConnection("Data source=" & My.Settings.ip & "," & My.Settings.port & ";Network Library=DBMSSOCN;initial catalog=offpodb;User id=" & My.Settings.username & ";Password=" & My.Settings.password & ";")
con.Open()
If connected.Dispatcher.CheckAccess Then
connected.Content = "text"
Else
' i dunno what to use here as it is not the same as WinForms
End If
What to do ?
OR
Please help me convert this c# code to WPF VB.NET
Label1.Invoke((MethodInvoker)delegate {
Label1.Text = i.ToString() + "Files Converted";});