Private Sub Combo1_KeyPress(Key As Integer)
If Key = 13 Then   '表示按下的是回车键
Combo1.AddItem Combo1.text, 0Combo1.SelStart = 0
Combo1.SelLength = Len(Combo1.text)  end if 看书上的介绍的时候看到这段代码,大概意思就是当输入为回车键的时候,就把输入的信息作为一个成员添加进组合框里
但是这段有什么用?
Combo1.SelStart = 0
Combo1.SelLength = Len(Combo1.text)
我试着删除了这2句,一样可以正常运行啊,麻烦诸位给解释下