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-6-7.FRM (.txt) < prev    next >
Encoding:
Visual Basic Form  |  1998-09-21  |  2.8 KB  |  87 lines

  1. VERSION 5.00
  2. Begin VB.Form frmExpenses 
  3.    Caption         =   "Public 2-year College Expenses"
  4.    ClientHeight    =   3168
  5.    ClientLeft      =   936
  6.    ClientTop       =   2208
  7.    ClientWidth     =   3960
  8.    BeginProperty Font 
  9.       Name            =   "MS Sans Serif"
  10.       Size            =   7.8
  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     =   3168
  20.    ScaleWidth      =   3960
  21.    Begin VB.PictureBox picTable 
  22.       BeginProperty Font 
  23.          Name            =   "Courier New"
  24.          Size            =   10.2
  25.          Charset         =   0
  26.          Weight          =   700
  27.          Underline       =   0   'False
  28.          Italic          =   0   'False
  29.          Strikethrough   =   0   'False
  30.       EndProperty
  31.       Height          =   2295
  32.       Left            =   240
  33.       ScaleHeight     =   2244
  34.       ScaleWidth      =   3444
  35.       TabIndex        =   1
  36.       Top             =   120
  37.       Width           =   3495
  38.    End
  39.    Begin VB.CommandButton cmdDisplay 
  40.       Caption         =   "Display Expenses"
  41.       Height          =   375
  42.       Left            =   960
  43.       TabIndex        =   0
  44.       Top             =   2640
  45.       Width           =   2295
  46.    End
  47. Attribute VB_Name = "frmExpenses"
  48. Attribute VB_GlobalNameSpace = False
  49. Attribute VB_Creatable = False
  50. Attribute VB_PredeclaredId = True
  51. Attribute VB_Exposed = False
  52. Private Sub cmdDisplay_Click()
  53.   Dim fmt1 As String, fmt2 As String
  54.   Dim col1 As String, col2 As String
  55.   'Average expenses of commuter students (1995-96)
  56.   picTable.Cls
  57.   picTable.Print Tab(19); "Pb 2-yr"
  58.   picTable.Print
  59.   fmt1 = "@@@@@@@@@@@@@@@@@"   '17 @ symbols
  60.   fmt2 = "@@@@@@"              '6 @ symbols
  61.   col1 = Format("Tuition & Fees", fmt1)
  62.   col2 = FormatNumber(1387, 0)
  63.   col2 = Format(col2, fmt2)
  64.   picTable.Print col1; Tab(19); col2
  65.   col1 = Format("Books & Supplies", fmt1)
  66.   col2 = FormatNumber(577, 0)
  67.   col2 = Format(col2, fmt2)
  68.   picTable.Print col1; Tab(19); col2
  69.   col1 = Format("Board", fmt1)
  70.   col2 = FormatNumber(1752, 0)
  71.   col2 = Format(col2, fmt2)
  72.   picTable.Print col1; Tab(19); col2
  73.   col1 = Format("Transportation", fmt1)
  74.   col2 = FormatNumber(894, 0)
  75.   col2 = Format(col2, fmt2)
  76.   picTable.Print col1; Tab(19); col2
  77.   col1 = Format("Other Expenses", fmt1)
  78.   col2 = FormatNumber(1142, 0)
  79.   col2 = Format(col2, fmt2)
  80.   picTable.Print col1; Tab(19); col2
  81.   picTable.Print Tab(19); "------"
  82.   col1 = Format("Total", fmt1)
  83.   col2 = FormatNumber(5752, 0)
  84.   col2 = Format(col2, fmt2)
  85.   picTable.Print col1; Tab(19); col2
  86. End Sub
  87.