我正在尝试使用 messageboxbuttons.yesno 清除文本框。如果他选择开始另一次转换,则清除文本框。我不知道有什么问题。公开课形式1
Private Sub BtnFah_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BtnFah.Click
Try
Dim intFah As Integer
intFah = CInt(TxtBoxTemp.Text)
intFah = (intFah * 9) / 5 - 32
MessageBox.Show(intFah.ToString & ControlChars.CrLf & "Would you like to start another temp conversion?", "Result", MessageBoxButtons.YesNo)
If intFah = Windows.Forms.DialogResult.Yes Then
TxtBoxTemp.Clear()
ElseIf intFah = Windows.Forms.DialogResult.No Then
End If
Catch
MessageBox.Show("Would you like to start another temp conversion?", "System Error", MessageBoxButtons.YesNo)
End Try
End Sub
End Class