我正在尝试创建一个跑步者,用户可以输入三个赛车手并为他们输入时间,其中结果将根据文本框中的最快时间显示,到目前为止我已完成编码但是我我不确定当我按下结果按钮时它为什么不起作用。
这是我的比赛代码
Private Sub btnCalculate_Click(sender As System.Object, e As System.EventArgs) Handles btnCalculate.Click
Dim mRunner1Time As String
Dim mRunner2Time As String
Dim mRunner3Time As String
mRunner1Time = (Val(uiRunner1TimeTextBox.Text))
mRunner2Time = (Val(uiRunner2TimeTextBox.Text))
mRunner3Time = (Val(uiRnner3TimeTextBox.Text))
If mRunner1Time < mRunner3Time And mRunner1Time < mRunner2Time And _
mRunner2Time < mRunner3Time Then
uiFirstTextBox = uiRuuner1TextBox
uiSecondTextBox = uiRunner2TextBox
uiThirdTextBox = uiRunner3TextBox
ElseIf mRunner1Time < mRunner3Time And mRunner1Time < mRunner2Time And
mRunner3Time < mRunner2Time Then
uiFirstTextBox = uiRuuner1TextBox
uiSecondTextBox = uiRunner3TextBox
uiThirdTextBox = uiRunner2TextBox
ElseIf mRunner2Time < mRunner1Time And mRunner2Time < mRunner3Time And
mRunner1Time < mRunner3Time Then
uiFirstTextBox = uiRunner2TextBox
uiSecondTextBox = uiRuuner1TextBox
uiThirdTextBox = uiRunner3TextBox
ElseIf mRunner2Time < mRunner1Time And mRunner2Time < mRunner3Time And
mRunner3Time < mRunner1Time Then
uiFirstTextBox = uiRunner2TextBox
uiSecondTextBox = uiRunner3TextBox
uiThirdTextBox = uiRuuner1TextBox
ElseIf mRunner3Time < mRunner1Time And mRunner3Time < mRunner2Time And
mRunner1Time < mRunner2Time Then
uiFirstTextBox = uiRunner3TextBox
uiSecondTextBox = uiRuuner1TextBox
uiThirdTextBox = uiRunner2TextBox
ElseIf mRunner3Time < mRunner1Time And mRunner3Time < mRunner2Time And
mRunner2Time < mRunner1Time Then
uiFirstTextBox = uiRunner3TextBox
uiSecondTextBox = uiRunner2TextBox
uiThirdTextBox = uiRuuner1TextBox
End If
End Sub