VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



Dials a telephone number w/o using APIs

by alex (11 Submissions)
Category: Miscellaneous
Compatability: Visual Basic 3.0
Difficulty: Unknown Difficulty
Date Added: Wed 3rd February 2021
Rating: (6 Votes)

Uses the MSComm control to call a telephone number using your modem WITHOUT HAVEING DIALER.EXE! :)

Inputs
num - the telephone number
Assumes
Assumes you have a MSComm control on your form named "Communications"

Rate Dials a telephone number w/o using APIs

Private Sub Dial(num As String)
 ' Open the com port.
 Communications.PortOpen = True
 ' Send the attention command to the modem.
 Communications.Output = "AT" + Chr$(13)
 ' Wait for processing.
 Do
  DoEvents
  Loop Until Communications.InBufferCount >= 2
  ' Dial the number.
  Communications.Output = "ATDT " + num + Chr$(13)
  ' Takes about 47 sec. to dial
  wait = Timer + 47
  Do
   DoEvents
   Loop While Timer <= wait
   ' Uncomment to disconnect after dialing.
   'Communications.PortOpen = False
  End Sub

Download this snippet    Add to My Saved Code

Dials a telephone number w/o using APIs Comments

No comments have been posted about Dials a telephone number w/o using APIs. Why not be the first to post a comment about Dials a telephone number w/o using APIs.

Post your comment

Subject:
Message:
0/1000 characters