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 / CH10 / 10-3-1.FRM (.txt) < prev    next >
Encoding:
Visual Basic Form  |  1998-09-18  |  1.9 KB  |  56 lines

  1. VERSION 5.00
  2. Begin VB.Form frm10_3_1 
  3.    Caption         =   "Simple Bar Chart"
  4.    ClientHeight    =   3705
  5.    ClientLeft      =   1530
  6.    ClientTop       =   2100
  7.    ClientWidth     =   4560
  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     =   3705
  20.    ScaleWidth      =   4560
  21.    Begin VB.PictureBox picPop 
  22.       Height          =   2895
  23.       Left            =   120
  24.       ScaleHeight     =   2835
  25.       ScaleWidth      =   4275
  26.       TabIndex        =   1
  27.       Top             =   720
  28.       Width           =   4335
  29.    End
  30.    Begin VB.CommandButton cmdDisplayPop 
  31.       Caption         =   "Display Populations"
  32.       Height          =   495
  33.       Left            =   1080
  34.       TabIndex        =   0
  35.       Top             =   120
  36.       Width           =   2415
  37.    End
  38. Attribute VB_Name = "frm10_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 cmdDisplayPop_Click()
  44.   'Populations of California and New York
  45.   picPop.Scale (-1, 40)-(3, -5)         'Specify coordinates
  46.   picPop.Line (-1, 0)-(3, 0)            'Draw x-axis
  47.   picPop.Line (0, -5)-(0, 40)           'Draw y-axis
  48.   picPop.Line (0.7, 32)-(1.3, 0), , BF  'Draw solid rectangle for CA
  49.   picPop.Line (1.7, 18)-(2.3, 0), , BF  'Draw solid rectangle for NY
  50.   picPop.CurrentY = -1      'Vertical position for labels
  51.   picPop.CurrentX = 0.7     'Beginning horizontal position of label for CA
  52.   picPop.Print "California";
  53.   picPop.CurrentX = 1.7     'Beginning horizontal position of label for NY
  54.   picPop.Print "New York";
  55. End Sub
  56.