在窗体上画一个名称为Combo1的组合框,画两个名称分别Labe11和Labe12及Caption属性分别为“城市名
Private Sub Combo1【 】(KeyAscii As Integer) If KeyAscii=13 Then For i=0 To Combo1;ListCount-1 If Combo1.Text=【 】Then LabeCaption="输入项已在组合框中" Exit Sub End If Next i LabeCaption="已成功添加输入项" Combo1.【 】Combo1.Text End If End Sub