I am building a DLL which does a lot of number crunching and consists of a Class Module with the Public declarations and some Modules with lots of maths sub routines.
I want to raise an event in a module which will update a progeress bar in the calling application.
So in my Class Module Thermal I have
Public Event MyProgress(ByVal percentDone As Single, ByVal IterationNo As Integer)
Public Sub UpdateProgressBar()
RaiseEvent MyProgress(progress, iter)
End Sub
and in my module I call Thermal.UpdateProgressBar()
this gives an error because it says the UpdateProgressBar is not declared.
if I make the Sub Public Shared my module can now call the Sub but I get an error
at the RaiseEvent Cannot refer to an instance of a class from within a shared method or shared member initializer without an explicit instance of the class.
Can anyone point me at a solution to this problem
I want to raise an event in a module which will update a progeress bar in the calling application.
So in my Class Module Thermal I have
Public Event MyProgress(ByVal percentDone As Single, ByVal IterationNo As Integer)
Public Sub UpdateProgressBar()
RaiseEvent MyProgress(progress, iter)
End Sub
and in my module I call Thermal.UpdateProgressBar()
this gives an error because it says the UpdateProgressBar is not declared.
if I make the Sub Public Shared my module can now call the Sub but I get an error
at the RaiseEvent Cannot refer to an instance of a class from within a shared method or shared member initializer without an explicit instance of the class.
Can anyone point me at a solution to this problem