Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Visual Basic > VB 6 Visual Basic 6 > VB How-To
|
VB How-To Ask your "How do I do this with VB?" questions in this forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the VB How-To section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old April 14th, 2005, 04:45 PM
Authorized User
 
Join Date: Jul 2003
Posts: 98
Thanks: 0
Thanked 0 Times in 0 Posts
Default Handling Events with FAXCOMEXLib

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.







Similar Threads
Thread Thread Starter Forum Replies Last Post
problem with recieving fax by FAXCOMEXLib ahmedelmassry C# 2005 0 July 25th, 2006 07:46 AM
Handling events of child ctrls(chkBox) in DataGrid malikamjad ASP.NET 1.0 and 1.1 Professional 0 July 13th, 2006 09:56 AM
Help! - Can't Figure Out FaxCOMEXLib [email protected] VB How-To 0 May 10th, 2005 09:13 PM
Handling Events on Inherited Forms phil_kenney VB.NET 2002/2003 Basics 0 January 18th, 2005 11:34 AM
help with Events egiblock JSP Basics 0 October 6th, 2003 11:39 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.