Public Class Form1 Dim a As Integer Dim b As Integer Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click If a = 0 Then '第一层 If RadioButton1.Checked = True Then b = 0 RadioButton1.Text = "易出现斑点" RadioButton2.Text = "不易出现斑点" ElseIf RadioButton2.Checked = True Then b = 1 RadioButton1.Text = "顶芽易枯死" RadioButton2.Text = "顶芽不易枯死"
End If a = 1
ElseIf a = 1 Then '第二层 If b = 0 And RadioButton1.Checked = True Then RadioButton1.Text = "新叶淡绿、老叶黄化枯焦、早衰" RadioButton2.Text = "茎叶暗绿或紫红色、生育期延迟" b = 3
ElseIf b = 0 And RadioButton2.Checked = True Then RadioButton3.Visible = True RadioButton1.Text = "叶尖叶缘先干枯,并出现斑点" RadioButton2.Text = "老组织易出现斑点,脉间失绿" RadioButton3.Text = "新叶或中部叶发灰,生长变粗,叶小簇生" b = 4
ElseIf b = 1 And RadioButton1.Checked = True Then RadioButton1.Text = "叶尖弯钩状,并相互粘连,不易伸张" RadioButton2.Text = "茎变粗,花器官发育不正常,生育期延迟" b = 5
ElseIf b = 1 And RadioButton2.Checked = True Then RadioButton3.Visible = True RadioButton4.Visible = True RadioButton5.Visible = True
RadioButton1.Text = "新叶黄化,失绿均一,生育期延迟" RadioButton2.Text = "脉间失绿,出现棕色细小斑点,组织易坏死"
RadioButton3.Text = "新梢不张开,幼叶卷曲,叶尖坏死,植株失绿" RadioButton4.Text = "脉间失绿,发展至整片叶淡黄或苍白" RadioButton5.Text = "叶片生长畸形,叶片布满斑点" b = 6
End If a = 2
Else '第三层 a = 1 If b = 3 And RadioButton1.Checked = True Then MsgBox("植株缺乏N", , "鉴定结果") ElseIf b = 3 And RadioButton2.Checked = True Then MsgBox("植株缺乏P", , "鉴定结果") ElseIf b = 4 And RadioButton1.Checked = True Then MsgBox("植株缺乏K", , "鉴定结果") ElseIf b = 4 And RadioButton2.Checked = True Then MsgBox("植株缺乏Mg", , "鉴定结果") ElseIf b = 4 And RadioButton3.Checked = True Then MsgBox("植株缺乏Zn", , "鉴定结果") ElseIf b = 5 And RadioButton1.Checked = True Then MsgBox("植株缺乏Ca", , "鉴定结果") ElseIf b = 5 And RadioButton2.Checked = True Then MsgBox("植株缺乏B", , "鉴定结果") ElseIf b = 6 And RadioButton1.Checked = True Then MsgBox("植株缺乏S", , "鉴定结果") ElseIf b = 6 And RadioButton2.Checked = True Then MsgBox("植株缺乏Mn", , "鉴定结果") ElseIf b = 6 And RadioButton3.Checked = True Then MsgBox("植株缺乏Cu", , "鉴定结果") ElseIf b = 6 And RadioButton4.Checked = True Then MsgBox("植株缺乏Fe", , "鉴定结果") ElseIf b = 6 And RadioButton5.Checked = True Then MsgBox("植株缺乏Mo", , "鉴定结果")
End If
End If End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click End End Sub
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load RadioButton1.Text = "老组织先出现" RadioButton2.Text = "新生组织先出现" RadioButton3.Visible = False RadioButton4.Visible = False RadioButton5.Visible = False End SubEnd Class
代码如上
疑问:


如果在点第二项 要点两次下一项才出结果 为什么 啊