(求助)textbox1.text为什么不会显示?
Public Class Form1Private Sub ComboBox1_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles ComboBox1.KeyDown
If e.KeyCode = 13 Then
ComboBox1.Items.Add(ComboBox1.Text)
TextBox1.Text = ComboBox1.Items.Count
End If
End Sub
Private Sub ComboBox1_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ComboBox1.SelectedIndexChanged
End Sub
Private Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click
If Timer1.Enabled = False Then
Timer1.Enabled = True
Button1.Text = "停止"
Else
Button1.Text = "开始"
Timer1.Enabled = False
End If
End Sub
Private Sub Timer1_Tick(ByVal sender As Object, ByVal e As System.EventArgs) Handles Timer1.Tick
Dim a, n As Integer
Randomize()
n = ComboBox1.Items.Count
a = Int(Rnd() * n)
ComboBox1.SelectedIndex = a
Label4.Text = ComboBox1.SelectedItem
End Sub
End Class