isnoend2001
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.
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
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
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
'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
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
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
ASKER