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 / CH3 / 3-5-7.FRM (.txt) < prev    next >
Encoding:
Visual Basic Form  |  1998-09-17  |  1.7 KB  |  58 lines

  1. VERSION 5.00
  2. Begin VB.Form frm3_5_7 
  3.    Caption         =   "3-5-7"
  4.    ClientHeight    =   1365
  5.    ClientLeft      =   1095
  6.    ClientTop       =   1485
  7.    ClientWidth     =   2475
  8.    BeginProperty Font 
  9.       Name            =   "MS Sans Serif"
  10.       Size            =   8.25
  11.       Charset         =   0
  12.       Weight          =   700
  13.       Underline       =   0   'False
  14.       Italic          =   0   'False
  15.       Strikethrough   =   0   'False
  16.    EndProperty
  17.    LinkTopic       =   "Form1"
  18.    PaletteMode     =   1  'UseZOrder
  19.    ScaleHeight     =   1365
  20.    ScaleWidth      =   2475
  21.    Begin VB.CommandButton cmdCompute 
  22.       Caption         =   "Compute Pay"
  23.       Default         =   -1  'True
  24.       Height          =   495
  25.       Left            =   480
  26.       TabIndex        =   1
  27.       Top             =   720
  28.       Width           =   1455
  29.    End
  30.    Begin VB.PictureBox picPay 
  31.       Height          =   495
  32.       Left            =   120
  33.       ScaleHeight     =   435
  34.       ScaleWidth      =   2235
  35.       TabIndex        =   0
  36.       Top             =   120
  37.       Width           =   2295
  38.    End
  39. Attribute VB_Name = "frm3_5_7"
  40. Attribute VB_GlobalNameSpace = False
  41. Attribute VB_Creatable = False
  42. Attribute VB_PredeclaredId = True
  43. Attribute VB_Exposed = False
  44. Private Sub cmdCompute_Click()
  45.   Dim nom As String     'Employee name
  46.   Dim wage As Single    'Hourly pay
  47.   Dim hrs As Single     'Number of hours worked during week
  48.   'Compute weekly pay
  49.   picPay.Cls
  50.   Open App.Path & "\STAFF.TXT" For Input As #1
  51.   'Get person's name, hourly pay, and hours worked
  52.   Input #1, nom, wage, hrs
  53.   picPay.Print nom; hrs * wage
  54.   Input #1, nom, wage, hrs
  55.   picPay.Print nom; hrs * wage
  56.   Close #1
  57. End Sub
  58.