Hello Everyone and thanks for your help in advance. I am working on a project that requires the programming of the MS Fax Service. I need to be able to react to events, specifically and incoming fax. I have looked at the documentation for programming and there are some VB6 examples, such as:
http://msdn.microsoft.com/library/de...using_8hlv.asp
However, when I try to convert the code to
VB.Net, either I am missing something or the example doesnât work. Here is my code:
<code>
Dim WithEvents objFaxServer As New FAXCOMEXLib.FaxServerClass
Dim _JobStatus As FAXCOMEXLib.FaxJobStatus
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Try
'Connect to the local fax server.
objFaxServer.Connect("")
'Now register for the desired events.
objFaxServer.ListenToServerEvents(FAXCOMEXLib.FAX_ SERVER_EVENTS_TYPE_ENUM.fsetINCOMING_CALL)
Catch ex As Exception
End Try
End Sub
Private Sub g_objFaxServer_OnIncomingJobAdded(ByVal pFaxServer As FAXCOMEXLib.IFaxServer, ByVal bstrJobId As String)
MsgBox("New job added to queue")
Label1.Text = "New Message"
End Sub
</code>
It would appear that there is no wiring to the event handler. I have fooled with a number of ways to get the handler set up, but canât seem to get it figured out. Any help on this issue would be greatly appreciated.