home *** CD-ROM | disk | FTP | other *** search
- VERSION 5.00
- Begin VB.Form frmQuiz
- Caption = "A Quiz"
- ClientHeight = 2130
- ClientLeft = 1560
- ClientTop = 1755
- ClientWidth = 3570
- BeginProperty Font
- Name = "MS Sans Serif"
- Size = 8.25
- Charset = 0
- Weight = 700
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- LinkTopic = "Form1"
- PaletteMode = 1 'UseZOrder
- ScaleHeight = 2130
- ScaleWidth = 3570
- Begin VB.PictureBox picSolution
- Height = 375
- Left = 240
- ScaleHeight = 315
- ScaleWidth = 3075
- TabIndex = 3
- Top = 1560
- Width = 3135
- End
- Begin VB.CommandButton cmdEvaluate
- Caption = "Evaluate Answer"
- Default = -1 'True
- Height = 495
- Left = 240
- TabIndex = 2
- Top = 840
- Width = 3135
- End
- Begin VB.TextBox txtAnswer
- Height = 285
- Left = 2400
- TabIndex = 1
- Top = 360
- Width = 975
- End
- Begin VB.Label lblQuestion
- Caption = "How many gallons does a ten-gallon hat hold?"
- Height = 495
- Left = 240
- TabIndex = 0
- Top = 240
- Width = 2055
- End
- Attribute VB_Name = "frmQuiz"
- Attribute VB_GlobalNameSpace = False
- Attribute VB_Creatable = False
- Attribute VB_PredeclaredId = True
- Attribute VB_Exposed = False
- Private Sub cmdEvaluate_Click()
- Dim answer As Single
- 'Evaluate answer
- picSolution.Cls
- answer = Val(txtAnswer.Text)
- If (answer >= 0.5) And (answer <= 1) Then
- picSolution.Print "Good, ";
- Else
- picSolution.Print "No, ";
- End If
- picSolution.Print "it holds about 3/4 of a gallon."
- End Sub
-