home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic Programmer'…arterly (Limited Edition) / Visual_Basic_Programmers_Journal_VB-CD_Quarterly_Limited_Edition_1995.iso / code / ch18code / termtest.frm (.txt) < prev    next >
Encoding:
Visual Basic Form  |  1995-08-17  |  1.9 KB  |  69 lines

  1. VERSION 4.00
  2. Begin VB.Form Form1 
  3.    Caption         =   "Form1"
  4.    ClientHeight    =   3336
  5.    ClientLeft      =   4800
  6.    ClientTop       =   2952
  7.    ClientWidth     =   3768
  8.    Height          =   3660
  9.    Left            =   4752
  10.    LinkTopic       =   "Form1"
  11.    ScaleHeight     =   3336
  12.    ScaleWidth      =   3768
  13.    Top             =   2676
  14.    Width           =   3864
  15.    Begin VB.CommandButton cmdHangup 
  16.       Caption         =   "Hang up"
  17.       Height          =   492
  18.       Left            =   1920
  19.       TabIndex        =   2
  20.       Top             =   2760
  21.       Width           =   1332
  22.    End
  23.    Begin VB.CommandButton cmdDial 
  24.       Caption         =   "Dial"
  25.       Height          =   492
  26.       Left            =   120
  27.       TabIndex        =   1
  28.       Top             =   2760
  29.       Width           =   1572
  30.    End
  31.    Begin VB.TextBox Text1 
  32.       Height          =   2652
  33.       Left            =   -120
  34.       TabIndex        =   0
  35.       Top             =   0
  36.       Width           =   3852
  37.    End
  38.    Begin VB.Timer Timer1 
  39.       Interval        =   1000
  40.       Left            =   3480
  41.       Top             =   2880
  42.    End
  43. Attribute VB_Name = "Form1"
  44. Attribute VB_Creatable = False
  45. Attribute VB_Exposed = False
  46. Option Explicit
  47. Dim objVBTerm As Object
  48. Private Sub cmdDial_Click()
  49.     ' Dial a number.
  50.     objVBTerm.Dial InputBox("Number to dial: ")
  51.     ' Trap text in the Terminal app.
  52.     ' (retrieved/displayed by Timer event).
  53.     objVBTerm.TrapText = True
  54. End Sub
  55. Private Sub cmdHangup_Click()
  56.     objVBTerm.Hangup
  57. End Sub
  58. Private Sub Form_Load()
  59.     ' Get the VBTerminal object.
  60.     Set objVBTerm = GetObject("", "VBTerm.Application")
  61. End Sub
  62. Private Sub Timer1_Timer()
  63.     Dim strResponse
  64.     ' Get text from the terminal app.
  65.     If objVBTerm.Changed Then
  66.         Text1.TEXT = Text1.TEXT & objVBTerm.TEXT
  67.     End If
  68. End Sub
  69.