【发布时间】:2015-07-17 17:29:24
【问题描述】:
这是我的潜艇:
Protected Sub PrincipleTextBox_TextChanged(sender As Object, e As EventArgs)
Try
principle = Single.Parse(PrincipleTextBox.Text)
PrincipleTextBox.BackColor = Drawing.Color.Empty
ResultLabel.ForeColor = Drawing.Color.Black
ResultLabel.Text = "hi"
Catch ex As Exception
PrincipleTextBox.BackColor = Drawing.Color.Pink
ResultLabel.ForeColor = Drawing.Color.Red
ResultLabel.Text = "Money values only for principle"
End Try
PrincipleTextBox.Text = FormatCurrency(principle)
End Sub
如果文本框中不是实数,我想阅读实数以了解原理和一些基本警告。所以,我输入 225 并不起作用(见图)。
为什么?
再次感谢您对我确定是一个基本问题的任何答案...仍在学习...
【问题讨论】: