home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic 4 Unleashed / Visual_Basic_4_Unleashed_SAMS_Publishing_1995.iso / source / chap26 / call.frm (.txt) next >
Encoding:
Visual Basic Form  |  1995-06-11  |  1.2 KB  |  37 lines

  1. VERSION 4.00
  2. Begin VB.Form Form1 
  3.    Caption         =   "Form1"
  4.    ClientHeight    =   4140
  5.    ClientLeft      =   1140
  6.    ClientTop       =   1515
  7.    ClientWidth     =   6690
  8.    Height          =   4545
  9.    Left            =   1080
  10.    LinkTopic       =   "Form1"
  11.    ScaleHeight     =   4140
  12.    ScaleWidth      =   6690
  13.    Top             =   1170
  14.    Width           =   6810
  15. Attribute VB_Name = "Form1"
  16. Attribute VB_Creatable = False
  17. Attribute VB_Exposed = False
  18. Private Sub Form_Load()
  19.      phone_num$ = Command$
  20.      i = Len(phone_num$)
  21.      If i = 0 Then End
  22.      retval& = tapiRequestMakeCall(phone_num$, "", phone_num$, "")
  23.      If retval& = 0& Then End
  24.      infostr$ = "Unable to dial " + phone_num$ + " because "
  25.      Select Case retval&
  26.      Case TAPIERR_NOREQUESTRECIPIENT
  27.           infostr$ = infostr$ + "a call-manager is unavailable."
  28.      Case TAPIERR_REQUESTQUEUEFULL
  29.           infostr$ = infostr$ + "the Windows Telephony dialing queue is full."
  30.      Case TAPIERR_INVALDESTADDRESS
  31.           infostr$ = infostr$ + "the phone number is invalid."
  32.      Case Else
  33.           infostr$ = infostr$ + "of an unknown problem."
  34.      End Select
  35.      MsgBox infostr$
  36. End Sub
  37.