我想通過使用messageboxbuttons.yesno清除文本框。如果他選擇開始另一次轉換,請清除文本框。我沒有什麼錯。 公共類Form1中如何使用messageboxbuttons.yesno清除文本框?
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
謝謝你,我得到它的工作。 :) – user2189046 2013-03-20 03:28:28