我对编程语言非常陌生,并且正在我大学的第一堂编程课上。对于一个项目,我们正在创建一个非常简单的项目,用户输入单词然后程序将它们组合在一起。这是我知道的第一天,但我正在努力争取额外的功劳和“添加一个复选框以允许在输入文本更改时更新标签”。
我有一个程序,当您在单独的文本框中输入两个单独的单词时,它会单独显示每个单词,然后将这两个单词组合在底部。我们的教授希望我在底部添加一个复选框选项,当点击 make 它时,当用户键入两个单词时,它们会自动显示而不点击显示按钮。
我知道这很容易,但任何帮助将不胜感激。
感谢您的帮助。
Public Class form1
Private Sub Label1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles lblLeft.Click
End Sub
Private Sub lbl2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles lblRight.Click
End Sub
Private Sub txtBoxLeft_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles txtBoxLeft.TextChanged
End Sub
Private Sub btnUpdate_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnUpdate.Click
Dim strTxtBoxLeft As String
strTxtBoxLeft = txtBoxLeft.Text
Dim strTxtBoxRight As String
strTxtBoxRight = txtBoxRight.Text
lblLeft.Text = strTxtBoxLeft
lblRight.Text = strTxtBoxRight
lblCombo.Text = strTxtBoxLeft & " " & strTxtBoxRight
End Sub
Private Sub chkbox_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles chkbox.CheckedChanged
If chkbox.CheckState = False Then
End If
End Sub
Private Sub btnExit_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnExit.Click
Me.Close()
End Sub
End Class