vb控件获得焦点

2024-11-23 23:53:24
推荐回答(3个)
回答1:

Dim a
Private Sub DataCombo1_Change(Index As Integer)
If DataCombo1(a).Text <> "" Then
Command1.Enabled = True
Else
Command1.Enabled = False
End If
End Sub
Private Sub Form_Activate()
For j = 0 To 3
If DataCombo1(j).Text = "搭袜野" Then
a = j
DataCombo1(j).SetFocus
Command1.Enabled = False
Exit For
Else
End If
Next j
End Sub
Private Sub Form_Load()
For i = 1 To 3
Load DataCombo1(i)
DataCombo1(i).Top = DataCombo1(i).Top + 500 * i
DataCombo1(i).Visible = True
Next i
DataCombo1(2).Text = "知喊好燃"
End Sub

回答2:

if datacombo()=“搏梁” then
command.setfoucs
command.enbale=false
end if
要是有拼错的改一备碧下基滚运

回答3:

Hi me
I can do it for you.