Results 1 to 2 of 2

Thread: data

  1. #1

    Thread Starter
    Addicted Member hyousuf2's Avatar
    Join Date
    Dec 2004
    Location
    Dublin
    Posts
    226

    data

    hi im tryin to configure a comm control to notify me when data comes n goes, i established an internet dial up connection n then ran the following code which din't do ne thing

    Const comEvSend = 1
    Const comEvReceive = 2

    Private Sub Form_Load()
    MSComm1.CommPort = 3
    End Sub

    Private Sub MSComm1_OnComm()
    If CommEvent = comEvSen Then
    MsgBox "Data sent"
    ElseIf CommEvent = comevrecieve Then
    MsgBox "Data recieved"
    End If

    End Sub

  2. #2
    Frenzied Member trisuglow's Avatar
    Join Date
    Jan 2002
    Location
    Horsham, Sussex, UK
    Posts
    1,536

    Re: data

    I don't think you can do what you want this way. In order to use the COM port from your code you must open it from your code (MSComm1.PortOpen = True). If is already in use by your internet connection you won't be able to open it.

    Maybe you can look at capturing Windows messages being passed to/from the COM port. I don't know off-hand how to do this, but there should be posts on this site that would help.
    This world is not my home. I'm just passing through.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width