Visual Basic不会打印到文本框

时间:2015-09-29 01:54:44

标签: vb.net textbox

这是我遇到问题的代码:

Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
    Dim THR As Double
    Dim a As Double
    Dim r As Double
    THR = CDbl(0.7 * (220 - a) + 0.3 * r)
    textBox.Text = "Your THR is" & THR & " beats a minute"

End Sub

我希望从TextBox1TextBox2获取信息,然后将其打印到TextBox,但我很难理解从哪里开始。

1 个答案:

答案 0 :(得分:0)

尝试

textBox.Text =“你的THR是”& THR.value&“打一分钟”

OR

textBox.Text =“你的THR是”& THR.value.tostring()& “打一分钟”

可能......

textBox.Text =“你的THR是”+& THR.value& +“打一分钟”