VERSION 5.00
Begin VB.Form Form1 
   Caption         =   "Form1"
   ClientHeight    =   4095
   ClientLeft      =   60
   ClientTop       =   450
   ClientWidth     =   4200
   LinkTopic       =   "Form1"
   ScaleHeight     =   4095
   ScaleWidth      =   4200
   StartUpPosition =   3  'Windows Default
   Begin VB.CommandButton cmdExit 
      Caption         =   "&Exit"
      Height          =   495
      Left            =   3480
      TabIndex        =   11
      Top             =   3480
      Width           =   615
   End
   Begin VB.OptionButton Option1 
      Caption         =   "Option1"
      Height          =   255
      Left            =   240
      TabIndex        =   10
      Top             =   120
      Width           =   975
   End
   Begin VB.ComboBox cbo3 
      Height          =   315
      Left            =   2520
      TabIndex        =   9
      Top             =   240
      Visible         =   0   'False
      Width           =   1215
   End
   Begin VB.OptionButton Option3 
      Caption         =   "Option3"
      Height          =   255
      Left            =   240
      TabIndex        =   8
      Top             =   840
      Width           =   855
   End
   Begin VB.CommandButton cmdA 
      Caption         =   "&Answer"
      Height          =   495
      Left            =   2520
      TabIndex        =   7
      Top             =   3480
      Width           =   855
   End
   Begin VB.TextBox txtA 
      Height          =   975
      Left            =   240
      MultiLine       =   -1  'True
      TabIndex        =   6
      Top             =   2280
      Width           =   3735
   End
   Begin VB.TextBox txtQC 
      Height          =   375
      Left            =   240
      TabIndex        =   5
      Top             =   3480
      Width           =   855
   End
   Begin VB.TextBox txtQ 
      Height          =   975
      Left            =   240
      MultiLine       =   -1  'True
      TabIndex        =   4
      Top             =   1200
      Width           =   3735
   End
   Begin VB.CommandButton cmdQ 
      Caption         =   "&Question"
      Height          =   495
      Left            =   1440
      TabIndex        =   3
      Top             =   3480
      Width           =   975
   End
   Begin VB.ComboBox cbo2 
      Height          =   315
      Left            =   2520
      TabIndex        =   2
      Top             =   240
      Visible         =   0   'False
      Width           =   1215
   End
   Begin VB.ComboBox cbo1 
      Height          =   315
      Left            =   2520
      TabIndex        =   1
      Top             =   240
      Visible         =   0   'False
      Width           =   1215
   End
   Begin VB.OptionButton Option2 
      Caption         =   "Option2"
      Height          =   495
      Left            =   240
      TabIndex        =   0
      Top             =   360
      Width           =   2175
   End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Form_Load()

cbo1.AddItem ""
cbo1.AddItem "a"
cbo1.AddItem "b"
cbo2.AddItem "c"
cbo2.AddItem "d"
cbo3.AddItem "a"
cbo3.AddItem "b"
cbo3.AddItem "c"
cbo3.AddItem "d"

Option1.Caption = "a-b"
Option2.Caption = "c-d"
Option3.Caption = "a-d"

End Sub
Private Sub Option1_Click()

cbo1.Visible = True
cbo2.Text = ""
cbo2.Visible = False
cbo3.Text = ""
cbo3.Visible = False

End Sub
Private Sub Option2_Click()

cbo1.Visible = False
cbo1.Text = ""
cbo2.Visible = True
cbo3.Text = ""
cbo3.Visible = False

End Sub
Private Sub Option3_Click()

cbo1.Visible = False
cbo1.Text = ""
cbo2.Visible = False
cbo2.Text = ""
cbo3.Visible = True

End Sub
Private Sub cmdQ_Click()

Dim i As Integer
Dim strNumString As String
Dim strNums() As String

    txtA.Text = ""
    
        If cbo1.Text = "a" Then
            strNumString = strNumString & "1 2 "
          
        ElseIf cbo1.Text = "b" Then
            strNumString = strNumString & "3 "
          
        ElseIf cbo2.Text = "c" Then
            strNumString = strNumString & "4 5 6 "
          
        ElseIf cbo2.Text = "d" Then
             strNumString = strNumString & "7 "
         
        ElseIf cbo3.Text = "a" Then
            strNumString = strNumString & "1 2 "
          
        ElseIf cbo3.Text = "b" Then
            strNumString = strNumString & "3 "
                   
        ElseIf cbo3.Text = "c" Then
            strNumString = strNumString & "4 5 6 "
       
        ElseIf cbo3.Text = "d" Then
            strNumString = strNumString & "7 "
          
         
        ElseIf cbo1.Text = "" And cbo2.Text = "" And cbo3.Text = "" Then
          MsgBox "Select one item in the comboBox!", vbInformation, "Notice"
        Exit Sub
          End If
    
    strNums = Split(strNumString, " ")
    
    Randomize
    i = Int(Rnd() * (UBound(strNums)))
    
    txtQC.Text = strNums(i)
  
End Sub
Private Sub txtQC_Change()

If txtQC.Text = "1" Then
txtQ.Text = "What are you doing?"

ElseIf txtQC.Text = "2" Then
txtQ.Text = "Can you always do what you want?"

ElseIf txtQC.Text = "3" Then
txtQ.Text = "What will you do if you can't achieve what you want?"

ElseIf txtQC.Text = "4" Then
txtQ.Text = "How do you feel if someone help you to achieve something which you can't do it yourself?"

ElseIf txtQC.Text = "5" Then
txtQ.Text = "When you are in trouble, do you belive there will be at least one helping you always?"

ElseIf txtQC.Text = "6" Then
txtQ.Text = "Do you agree that there is no free lunch in the world?"

ElseIf txtQC.Text = "7" Then
txtQ.Text = "Will you help if someone asking for?"

End If
End Sub
Private Sub cmdA_Click()

If txtQC.Text = "1" Then
txtA.Text = "I am developing a small interface to help a grade 12 students prepare for their examination."

ElseIf txtQC.Text = "2" Then
txtA.Text = "No, no one always can. We are dependant!"

ElseIf txtQC.Text = "3" Then
txtA.Text = "First I will try my best...but if I can't then I will ask friends for help."

ElseIf txtQC.Text = "4" Then
txtA.Text = "Very proud...and always remember it."

ElseIf txtQC.Text = "5" Then
txtA.Text = "Yes, although sometimes I didn't but there will always be someone to help."

ElseIf txtQC.Text = "6" Then
txtA.Text = "No, there is free luch. May be you don't have it today but perhaps tomorrow."

ElseIf txtQC.Text = "7" Then
txtA.Text = "I will be very pleased to help if I can."

End If
End Sub
Private Sub cmdExit_Click()
End
End Sub

