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 / CH6 / 6-3-1.FRM (.txt) < prev    next >
Encoding:
Visual Basic Form  |  1998-11-02  |  1.5 KB  |  53 lines

  1. VERSION 5.00
  2. Begin VB.Form frm6_3_1 
  3.    Caption         =   "POPULATION GROWTH"
  4.    ClientHeight    =   2055
  5.    ClientLeft      =   1575
  6.    ClientTop       =   1635
  7.    ClientWidth     =   3270
  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     =   2055
  20.    ScaleWidth      =   3270
  21.    Begin VB.PictureBox picTable 
  22.       Height          =   1215
  23.       Left            =   600
  24.       ScaleHeight     =   1155
  25.       ScaleWidth      =   1995
  26.       TabIndex        =   1
  27.       Top             =   720
  28.       Width           =   2055
  29.    End
  30.    Begin VB.CommandButton cmdDisplay 
  31.       Caption         =   "Display Population"
  32.       Height          =   495
  33.       Left            =   600
  34.       TabIndex        =   0
  35.       Top             =   120
  36.       Width           =   2055
  37.    End
  38. Attribute VB_Name = "frm6_3_1"
  39. Attribute VB_GlobalNameSpace = False
  40. Attribute VB_Creatable = False
  41. Attribute VB_PredeclaredId = True
  42. Attribute VB_Exposed = False
  43. Private Sub cmdDisplay_Click()
  44.   Dim pop As Single, yr As Integer
  45.   'Display population from 1998 to 2002
  46.   picTable.Cls
  47.   pop = 300000
  48.   For yr = 1998 To 2002
  49.     picTable.Print yr, FormatNumber(pop, 0)
  50.     pop = pop + 0.03 * pop
  51.   Next yr
  52. End Sub
  53.