home *** CD-ROM | disk | FTP | other *** search
/ Mastering Visual Basic 6 / mastvb6.iso / mastvb6.exe / Ch03 / Types / TypeForm.frm (.txt) next >
Encoding:
Visual Basic Form  |  1996-03-01  |  8.2 KB  |  260 lines

  1. VERSION 5.00
  2. Begin VB.Form TYPEForm 
  3.    Caption         =   "Functions returning custom types"
  4.    ClientHeight    =   4500
  5.    ClientLeft      =   60
  6.    ClientTop       =   345
  7.    ClientWidth     =   6165
  8.    LinkTopic       =   "Form1"
  9.    ScaleHeight     =   4500
  10.    ScaleWidth      =   6165
  11.    StartUpPosition =   3  'Windows Default
  12.    Begin VB.CommandButton Command1 
  13.       Caption         =   "Show Next"
  14.       BeginProperty Font 
  15.          Name            =   "Verdana"
  16.          Size            =   11.25
  17.          Charset         =   0
  18.          Weight          =   400
  19.          Underline       =   0   'False
  20.          Italic          =   0   'False
  21.          Strikethrough   =   0   'False
  22.       EndProperty
  23.       Height          =   495
  24.       Left            =   4320
  25.       TabIndex        =   0
  26.       Top             =   3840
  27.       Width           =   1695
  28.    End
  29.    Begin VB.Label Label12 
  30.       Caption         =   "BALANCE"
  31.       BeginProperty Font 
  32.          Name            =   "Verdana"
  33.          Size            =   9
  34.          Charset         =   0
  35.          Weight          =   400
  36.          Underline       =   0   'False
  37.          Italic          =   0   'False
  38.          Strikethrough   =   0   'False
  39.       EndProperty
  40.       Height          =   255
  41.       Left            =   240
  42.       TabIndex        =   12
  43.       Top             =   3000
  44.       Width           =   1935
  45.    End
  46.    Begin VB.Label Label11 
  47.       Caption         =   "COUNTRY"
  48.       BeginProperty Font 
  49.          Name            =   "Verdana"
  50.          Size            =   9
  51.          Charset         =   0
  52.          Weight          =   400
  53.          Underline       =   0   'False
  54.          Italic          =   0   'False
  55.          Strikethrough   =   0   'False
  56.       EndProperty
  57.       Height          =   255
  58.       Left            =   3240
  59.       TabIndex        =   11
  60.       Top             =   2040
  61.       Width           =   2415
  62.    End
  63.    Begin VB.Label Label10 
  64.       Caption         =   "CITY"
  65.       BeginProperty Font 
  66.          Name            =   "Verdana"
  67.          Size            =   9
  68.          Charset         =   0
  69.          Weight          =   400
  70.          Underline       =   0   'False
  71.          Italic          =   0   'False
  72.          Strikethrough   =   0   'False
  73.       EndProperty
  74.       Height          =   255
  75.       Left            =   240
  76.       TabIndex        =   10
  77.       Top             =   2040
  78.       Width           =   1335
  79.    End
  80.    Begin VB.Label Label9 
  81.       Caption         =   "ADDRESS"
  82.       BeginProperty Font 
  83.          Name            =   "Verdana"
  84.          Size            =   9
  85.          Charset         =   0
  86.          Weight          =   400
  87.          Underline       =   0   'False
  88.          Italic          =   0   'False
  89.          Strikethrough   =   0   'False
  90.       EndProperty
  91.       Height          =   255
  92.       Left            =   240
  93.       TabIndex        =   9
  94.       Top             =   1080
  95.       Width           =   2415
  96.    End
  97.    Begin VB.Label Label8 
  98.       Caption         =   "CUSTOMER SINCE"
  99.       BeginProperty Font 
  100.          Name            =   "Verdana"
  101.          Size            =   9
  102.          Charset         =   0
  103.          Weight          =   400
  104.          Underline       =   0   'False
  105.          Italic          =   0   'False
  106.          Strikethrough   =   0   'False
  107.       EndProperty
  108.       Height          =   255
  109.       Left            =   3630
  110.       TabIndex        =   8
  111.       Top             =   90
  112.       Width           =   2055
  113.    End
  114.    Begin VB.Label Label7 
  115.       Caption         =   "COMPANY"
  116.       BeginProperty Font 
  117.          Name            =   "Verdana"
  118.          Size            =   9
  119.          Charset         =   0
  120.          Weight          =   400
  121.          Underline       =   0   'False
  122.          Italic          =   0   'False
  123.          Strikethrough   =   0   'False
  124.       EndProperty
  125.       Height          =   255
  126.       Left            =   240
  127.       TabIndex        =   7
  128.       Top             =   120
  129.       Width           =   2175
  130.    End
  131.    Begin VB.Label lblBALANCE 
  132.       BackColor       =   &H00FFFFFF&
  133.       BorderStyle     =   1  'Fixed Single
  134.       BeginProperty Font 
  135.          Name            =   "Verdana"
  136.          Size            =   9.75
  137.          Charset         =   0
  138.          Weight          =   400
  139.          Underline       =   0   'False
  140.          Italic          =   0   'False
  141.          Strikethrough   =   0   'False
  142.       EndProperty
  143.       Height          =   375
  144.       Left            =   240
  145.       TabIndex        =   6
  146.       Top             =   3360
  147.       Width           =   2055
  148.    End
  149.    Begin VB.Label lblSINCE 
  150.       BackColor       =   &H00FFFFFF&
  151.       BorderStyle     =   1  'Fixed Single
  152.       BeginProperty Font 
  153.          Name            =   "Verdana"
  154.          Size            =   9.75
  155.          Charset         =   0
  156.          Weight          =   400
  157.          Underline       =   0   'False
  158.          Italic          =   0   'False
  159.          Strikethrough   =   0   'False
  160.       EndProperty
  161.       Height          =   375
  162.       Left            =   3630
  163.       TabIndex        =   5
  164.       Top             =   480
  165.       Width           =   2385
  166.    End
  167.    Begin VB.Label lblCOUNTRY 
  168.       BackColor       =   &H00FFFFFF&
  169.       BorderStyle     =   1  'Fixed Single
  170.       BeginProperty Font 
  171.          Name            =   "Verdana"
  172.          Size            =   9.75
  173.          Charset         =   0
  174.          Weight          =   400
  175.          Underline       =   0   'False
  176.          Italic          =   0   'False
  177.          Strikethrough   =   0   'False
  178.       EndProperty
  179.       Height          =   375
  180.       Left            =   3240
  181.       TabIndex        =   4
  182.       Top             =   2325
  183.       Width           =   2775
  184.    End
  185.    Begin VB.Label lblCITY 
  186.       BackColor       =   &H00FFFFFF&
  187.       BorderStyle     =   1  'Fixed Single
  188.       BeginProperty Font 
  189.          Name            =   "Verdana"
  190.          Size            =   9.75
  191.          Charset         =   0
  192.          Weight          =   400
  193.          Underline       =   0   'False
  194.          Italic          =   0   'False
  195.          Strikethrough   =   0   'False
  196.       EndProperty
  197.       Height          =   375
  198.       Left            =   240
  199.       TabIndex        =   3
  200.       Top             =   2325
  201.       Width           =   2775
  202.    End
  203.    Begin VB.Label lblADDRESS 
  204.       BackColor       =   &H00FFFFFF&
  205.       BorderStyle     =   1  'Fixed Single
  206.       BeginProperty Font 
  207.          Name            =   "Verdana"
  208.          Size            =   9.75
  209.          Charset         =   0
  210.          Weight          =   400
  211.          Underline       =   0   'False
  212.          Italic          =   0   'False
  213.          Strikethrough   =   0   'False
  214.       EndProperty
  215.       Height          =   375
  216.       Left            =   240
  217.       TabIndex        =   2
  218.       Top             =   1395
  219.       Width           =   5775
  220.    End
  221.    Begin VB.Label lblCOMPANY 
  222.       BackColor       =   &H00FFFFFF&
  223.       BorderStyle     =   1  'Fixed Single
  224.       BeginProperty Font 
  225.          Name            =   "Verdana"
  226.          Size            =   9.75
  227.          Charset         =   0
  228.          Weight          =   400
  229.          Underline       =   0   'False
  230.          Italic          =   0   'False
  231.          Strikethrough   =   0   'False
  232.       EndProperty
  233.       Height          =   375
  234.       Left            =   240
  235.       TabIndex        =   1
  236.       Top             =   480
  237.       Width           =   3135
  238.    End
  239. Attribute VB_Name = "TYPEForm"
  240. Attribute VB_GlobalNameSpace = False
  241. Attribute VB_Creatable = False
  242. Attribute VB_PredeclaredId = True
  243. Attribute VB_Exposed = False
  244. Private Sub Command1_Click()
  245. Dim aCustomer As Customer
  246. Static currentIndex As Integer
  247.     currentIndex = currentIndex + 1
  248.     If currentIndex = CountCustomers() Then currentIndex = 1
  249.     aCustomer = GetCustomer(currentIndex)
  250.     lblCOMPANY.Caption = aCustomer.Company
  251.     lblSINCE.Caption = aCustomer.CustomerSince
  252.     lblADDRESS.Caption = aCustomer.Address
  253.     lblCITY.Caption = aCustomer.City
  254.     lblCOUNTRY = aCustomer.Country
  255.     lblBALANCE.Caption = aCustomer.Balance
  256. End Sub
  257. Private Sub Form_Load()
  258.     Call InitData
  259. End Sub
  260.