home *** CD-ROM | disk | FTP | other *** search
/ An Introduction to Progr…l Basic 6.0 (4th Edition) / An Introduction to Programming using Visual Basic 6.0.iso / PROGRAMS / CH7 / 7-3-2.FRM (.txt) < prev    next >
Encoding:
Visual Basic Form  |  1998-09-19  |  3.8 KB  |  132 lines

  1. VERSION 5.00
  2. Begin VB.Form frm7_3_2 
  3.    ClientHeight    =   1908
  4.    ClientLeft      =   1116
  5.    ClientTop       =   1488
  6.    ClientWidth     =   1584
  7.    BeginProperty Font 
  8.       Name            =   "MS Sans Serif"
  9.       Size            =   7.8
  10.       Charset         =   0
  11.       Weight          =   700
  12.       Underline       =   0   'False
  13.       Italic          =   0   'False
  14.       Strikethrough   =   0   'False
  15.    EndProperty
  16.    LinkTopic       =   "Form1"
  17.    PaletteMode     =   1  'UseZOrder
  18.    ScaleHeight     =   1908
  19.    ScaleWidth      =   1584
  20.    Begin VB.CommandButton cmdDigit 
  21.       Caption         =   "9"
  22.       Height          =   255
  23.       Index           =   9
  24.       Left            =   840
  25.       TabIndex        =   9
  26.       Top             =   840
  27.       Width           =   255
  28.    End
  29.    Begin VB.CommandButton cmdDigit 
  30.       Caption         =   "8"
  31.       Height          =   255
  32.       Index           =   8
  33.       Left            =   480
  34.       TabIndex        =   8
  35.       Top             =   840
  36.       Width           =   255
  37.    End
  38.    Begin VB.CommandButton cmdDigit 
  39.       Caption         =   "7"
  40.       Height          =   255
  41.       Index           =   7
  42.       Left            =   120
  43.       TabIndex        =   7
  44.       Top             =   840
  45.       Width           =   255
  46.    End
  47.    Begin VB.CommandButton cmdDigit 
  48.       Caption         =   "6"
  49.       Height          =   255
  50.       Index           =   6
  51.       Left            =   840
  52.       TabIndex        =   6
  53.       Top             =   480
  54.       Width           =   255
  55.    End
  56.    Begin VB.CommandButton cmdDigit 
  57.       Caption         =   "5"
  58.       Height          =   255
  59.       Index           =   5
  60.       Left            =   480
  61.       TabIndex        =   5
  62.       Top             =   480
  63.       Width           =   255
  64.    End
  65.    Begin VB.CommandButton cmdDigit 
  66.       Caption         =   "4"
  67.       Height          =   255
  68.       Index           =   4
  69.       Left            =   120
  70.       TabIndex        =   4
  71.       Top             =   480
  72.       Width           =   255
  73.    End
  74.    Begin VB.CommandButton cmdDigit 
  75.       Caption         =   "3"
  76.       Height          =   255
  77.       Index           =   3
  78.       Left            =   840
  79.       TabIndex        =   3
  80.       Top             =   120
  81.       Width           =   255
  82.    End
  83.    Begin VB.CommandButton cmdDigit 
  84.       Caption         =   "2"
  85.       Height          =   255
  86.       Index           =   2
  87.       Left            =   480
  88.       TabIndex        =   2
  89.       Top             =   120
  90.       Width           =   255
  91.    End
  92.    Begin VB.CommandButton cmdDigit 
  93.       Caption         =   "1"
  94.       Height          =   255
  95.       Index           =   1
  96.       Left            =   120
  97.       TabIndex        =   1
  98.       Top             =   120
  99.       Width           =   255
  100.    End
  101.    Begin VB.CommandButton cmdDigit 
  102.       Caption         =   "0"
  103.       Height          =   255
  104.       Index           =   0
  105.       Left            =   480
  106.       TabIndex        =   0
  107.       Top             =   1200
  108.       Width           =   255
  109.    End
  110.    Begin VB.Label lblPhoneNum 
  111.       BorderStyle     =   1  'Fixed Single
  112.       Height          =   255
  113.       Left            =   120
  114.       TabIndex        =   10
  115.       Top             =   1560
  116.       Width           =   975
  117.    End
  118. Attribute VB_Name = "frm7_3_2"
  119. Attribute VB_GlobalNameSpace = False
  120. Attribute VB_Creatable = False
  121. Attribute VB_PredeclaredId = True
  122. Attribute VB_Exposed = False
  123. Private Sub cmdDigit_Click(index As Integer)
  124.   lblPhoneNum.Caption = lblPhoneNum.Caption & Right(Str(index), 1)
  125.   If Len(lblPhoneNum.Caption) = 3 Then
  126.       lblPhoneNum.Caption = lblPhoneNum.Caption & "-"
  127.     ElseIf Len(lblPhoneNum.Caption) = 8 Then
  128.       MsgBox "Dialing ...", , ""
  129.       lblPhoneNum.Caption = ""
  130.   End If
  131. End Sub
  132.