NOTE: This property is available only in DLL
(COM Object) version of wodPop3 component.
Notification property holds reference to IwodPopClientNotify
interface that can be implemented by your application. When
this property is set, and contains such a reference,
wodPop3Com will call your method implementations instead of
firing events. More information on how this works can be
found here.
For example, instead of having this in your code (VB
example):
Private Sub Pop3_Disconnected(ByVal ErrorCode As
Long, ByVal ErrorText As
String)
End Sub
you will have this:
Private Sub
IwodPopClientNotify_Disconnected(ByVal Owner As
WODPOP3COMLib.IwodPop3Com, ByVal
ErrorCode As Long, ByVal ErrorText
As String)
End Sub
pretty much the same - except notification method has
one more argument - Owner, which
holds reference to wodPop3Com instance that called this
method.
In VB, to implement IwodPopClientNotify interface, you
need code like this:
- at the top of the code, in <general> section,
put this:
Dim Pop3 As wodPop3Com
Implements IwodPopClientNotify
- in Form_Load (or where you initialize new instance of
wodPop3Com) do this:
Set Pop3 = New wodPop3Com
Set Pop3.Notification =
Me
Pop3.Port = 110
Pop3.Hostname....
'...
You can notice that when we declared Pop3, we did not
use WithEvents keyword - it is not
needed anymore, because events will not be fired anymore.
Notification methods we implement will be called
instead!