我有 5 个值,我正在比较它们并尝试根据哪个值最大来执行一些操作。
值为 v1、v2、v3、v4 和 v5
If (v1 > v2 And v1 > v3 And v1 > v4 And v1 > v5) Then
l1st.Text = "Al-Haj Shaji Gul"
Label5.ForeColor = Color.Red
Me.PictureBox12.Image = Global.shaji.My.Resources.Resources.shajismal
ElseIf (v2 > v3 And v2 > v4 And v2 > v1 And v2 > v5) Then
l1st.Text = "Nor huq"
Label6.ForeColor = Color.Red
Me.PictureBox12.Image = Global.shaji.My.Resources.Resources.norlhuq
ElseIf (v3 > v1 And v3 > v2 And v2 > v4 And v3 > v5) Then
l1st.Text = "Darya Khan"
Label7.ForeColor = Color.Red
Me.PictureBox12.Image = Global.shaji.My.Resources.Resources.daryakhanpic
ElseIf (v4 > v1 And v4 > v2 And v4 > v3 And v4 > v5) Then
l1st.Text = "Imran Khan"
Label8.ForeColor = Color.Red
Me.PictureBox12.Image = Global.shaji.My.Resources.Resources.Imran_Khan
ElseIf (v5 > v1 And v5 > v2 And v5 > v3 And v5 > v4) Then
l1st.Text = "Zarnoor Afridi"
Label10.ForeColor = Color.Red
Me.PictureBox12.Image = Global.shaji.My.Resources.Resources.zarnorsmal
End If