Forgive me for my ignorance in this matter. I am using .NET 1.1 and am trying to update a progress bar and message control in a form via some back-end code.
Here is my code for the message in the form class:
Here is my code that fires the message:
Not sure if its the way the code is being called in this instance as it is as a Thread:
Hopefully someone can see what I am missing here.
Here is my code for the message in the form class:
VB.NET:
Public Class frmMain
Friend WithEvents MySender As New BusinessService
Private Sub MySender_ProgressMsg(ByVal message As String) Handles MySender.ProgressMsg
Me.lblProgress.Text = message
End Sub
'Other form controls events and setup
End Class
Here is my code that fires the message:
VB.NET:
Public Class BusinessService
Public Event ProgressMsg(ByVal message As String)
Sub StartProcessData()
ProcessData()
End Sub
Public Function ProcessData() As Boolean
RaiseEvent ProgressMsg("The data processing has begun.")
' Some other processing
End Function
End Class
Not sure if its the way the code is being called in this instance as it is as a Thread:
VB.NET:
With New System.Threading.Thread(AddressOf service.StartProcessData)
.Start()
End With
Hopefully someone can see what I am missing here.