VB中的Combox如何在鼠标移动到某项时就将此项显示到文本框?
3个回答
展开全部
Private Sub Combo1_GotFocus()
Timer1.Enabled = True
End Sub
Private Sub Combo1_LostFocus()
Timer1.Enabled = False
End Sub
Private Sub Form_Load()
Timer1.Enabled = False
Timer1.Interval = 1
End Sub
Private Sub Timer1_Timer()
If Combo1.ListIndex = -1 Then Exit Sub
Combo1.Text = Combo1.List(Combo1.ListIndex)
End Sub
Timer1.Enabled = True
End Sub
Private Sub Combo1_LostFocus()
Timer1.Enabled = False
End Sub
Private Sub Form_Load()
Timer1.Enabled = False
Timer1.Interval = 1
End Sub
Private Sub Timer1_Timer()
If Combo1.ListIndex = -1 Then Exit Sub
Combo1.Text = Combo1.List(Combo1.ListIndex)
End Sub
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
加个timer控件
Private Sub Form_Load()
Timer1.Interval = 100
End Sub
Private Sub Timer1_Timer()
Me.Caption = Combo1.List(Combo1.ListIndex)
End Sub
Private Sub Form_Load()
Timer1.Interval = 100
End Sub
Private Sub Timer1_Timer()
Me.Caption = Combo1.List(Combo1.ListIndex)
End Sub
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
找一下Tip属性试试
本回答被提问者采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询