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 / CH5 / 5-2-1.FRM (.txt) next >
Encoding:
Visual Basic Form  |  1998-09-18  |  2.5 KB  |  85 lines

  1. VERSION 5.00
  2. Begin VB.Form frmMaximum 
  3.    Caption         =   "Maximum"
  4.    ClientHeight    =   2460
  5.    ClientLeft      =   2205
  6.    ClientTop       =   2280
  7.    ClientWidth     =   3135
  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     =   2460
  20.    ScaleWidth      =   3135
  21.    Begin VB.TextBox txtFirstNum 
  22.       Height          =   285
  23.       Left            =   1320
  24.       TabIndex        =   1
  25.       Top             =   240
  26.       Width           =   1335
  27.    End
  28.    Begin VB.PictureBox picResult 
  29.       Height          =   255
  30.       Left            =   120
  31.       ScaleHeight     =   195
  32.       ScaleWidth      =   2835
  33.       TabIndex        =   5
  34.       Top             =   2040
  35.       Width           =   2895
  36.    End
  37.    Begin VB.CommandButton cmdFindLarger 
  38.       Caption         =   "Find Larger Number"
  39.       Height          =   495
  40.       Left            =   120
  41.       TabIndex        =   4
  42.       Top             =   1320
  43.       Width           =   2895
  44.    End
  45.    Begin VB.TextBox txtSecondNum 
  46.       Height          =   285
  47.       Left            =   1320
  48.       TabIndex        =   3
  49.       Top             =   840
  50.       Width           =   1335
  51.    End
  52.    Begin VB.Label lblSecondNum 
  53.       Alignment       =   1  'Right Justify
  54.       Caption         =   "Second Number"
  55.       Height          =   495
  56.       Left            =   360
  57.       TabIndex        =   2
  58.       Top             =   720
  59.       Width           =   735
  60.    End
  61.    Begin VB.Label lblFirstNum 
  62.       Alignment       =   1  'Right Justify
  63.       Caption         =   "First Number"
  64.       Height          =   495
  65.       Left            =   360
  66.       TabIndex        =   0
  67.       Top             =   120
  68.       Width           =   735
  69.    End
  70. Attribute VB_Name = "frmMaximum"
  71. Attribute VB_GlobalNameSpace = False
  72. Attribute VB_Creatable = False
  73. Attribute VB_PredeclaredId = True
  74. Attribute VB_Exposed = False
  75. Private Sub cmdFindLarger_Click()
  76.   Dim largerNum As Single
  77.   picResult.Cls
  78.   If Val(txtFirstNum.Text) > Val(txtSecondNum.Text) Then
  79.       largerNum = Val(txtFirstNum.Text)
  80.     Else
  81.       largerNum = Val(txtSecondNum.Text)
  82.   End If
  83.   picResult.Print "The larger number is"; largerNum
  84. End Sub
  85.