Results 1 to 3 of 3

Thread: check state of a method all the time

  1. #1

    Thread Starter
    New Member
    Join Date
    Jul 2004
    Posts
    5

    check state of a method all the time

    Hello!

    I want to make a Dialer in VB. NET so I added a ActiveX component to my VB .NET project.

    Now there is a line.CallState() method in this component which holds the state of the telephone line. When the line.CallState() = 100 in this moment the phone connects to other side.

    Now i don't how to check the state of line.CallState() all the time.
    I want to make something like this If Line.CallState() == 100 Then
    MsgBox("You are now connected").
    But line.CallState() is in state 100 just a sec(or less). When I start to speak the line.CallState() changes in a diferent mode...

    tnx for help

  2. #2
    PowerPoster
    Join Date
    Dec 2003
    Location
    Bristol, England (but heart is in Virginia)
    Posts
    2,949
    Hi,

    I've not tried what you are doing but is there a CallStateChanged event? If it does use it and put

    Application.DoEvents

    in any other loops that may be running when the CallState changes. I would also suggest that CallState>99 is better than CallState=100 (resetting CallState as necessary).

    Perhaps you can't do anything about it but I would suggest it is dangerous to us reserved words as names. Even if you have written your own class, I would suggest calling it PhoneLine.
    Taxes
    The more I learn about VB.NET the more I like dBaseIII Plus

    The foregoing, whilst believed to be correct, is given without guarantee as to it's accuracy and entirely without recourse. You are required to decide for yourself whether or not it is suitable for your purposes and no liability for loss of any nature can be entertained.

  3. #3

    Thread Starter
    New Member
    Join Date
    Jul 2004
    Posts
    5
    i solved the problem..


    I found this:
    Private Sub AxetLine1_OnConnected(ByVal Sender As Object, ByVal e As AxetTT37.IetLineEvents_OnConnectedEvent) Handles AxetLine1.OnConnected
    MsgBox("connected")
    End Sub

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