Link to home
Start Free TrialLog in
Avatar of isnoend2001
isnoend2001Flag for United States of America

asked on

activex phone dialer

Want to add a phone dialer to my vb app.Looking  to purchase an activex phone dialer, looked at few, but don't need
all the bells and whistles. just want a phone dialer that will
realiably find the users com port the modem is hooked to, check the line statis and then dial the number.
ASKER CERTIFIED SOLUTION
Avatar of fantasy1001
fantasy1001

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of isnoend2001

ASKER

Thanks for example, but users are prompted for a port number and most users do not even know what a port is.
Avatar of fantasy1001
fantasy1001

You can search for modem port by this
'Controls: Timer1 (Timer), MSComm1 (MSComm control)
'Code:
Private Sub Form_Load()
    Dim s As String
    Dim iPort As Integer
    Dim n As Single
    Dim bModem As Boolean
   
    For iPort = 1 To 4
        With MSComm1
            .CommPort = iPort
            .Settings = "9600,N,8,1"
            .InputLen = 0
            On Error Resume Next
            .PortOpen = True
            If Err = 0 Then
                .Output = "ATV1Q0" & Chr$(13)
                n = Timer
                While Timer - n < 1
                    DoEvents
                Wend
                s = s & .Input
                .PortOpen = False
                If InStr(s, "OK" & vbCrLf) <> 0 Then
                    MsgBox "Modem detected on COM" & iPort
                    bModem = True
                    Exit For
                End If
            End If
        End With
    Next
    If Not bModem Then MsgBox "No modem detected"
    End
End Sub

iPort will be the modem port currently hook on to the computer
Avatar of Howard Cantrell
No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this question is:
No response from isnoend2001 from 10/22/2003 comment
Award points to fantasy1001 is recommend.
Please leave any comments here within the next seven days.
PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!

planocz
EE Cleanup Volunteer