展开全部
Public Sub ReSetTextBox( ctrl As Control)
Dim ct As Control
ct=ctrl
If (TypeOf ct Is TextBox) Then
ct.Text = ""
ElseIf (TypeOf ct Is ComboBox) Then
Dim cb As System.Windows.Forms.ComboBox = DirectCast(ct, System.Windows.Forms.ComboBox)
cb.SelectedIndex = -1
Else
For Each ct In ctrl.Controls
Try
For Each ct2 As Control In ct.Controls
ReSetTextBox(ct2)
Next
Catch
End Try
Next
End If
End Sub
已经私信你了,把ReSetTextBox(Me) 放到要用到的地方
来自:求助得到的回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询