判断控件是否在当前窗体?? If txtName.Parent Is Me Then .... 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 Dim ctl As ControlFor Each ctl In form1.Controls If ctl.Name = "txtname" Then Else End IfNext Private Function IsExist(ByVal ControlName As String) As Boolean Dim ctlOne As Control IsExist = False For Each ctlOne In Form1.Controls If UCase(ctlOne.Name) = UCase(ControlName) Then IsExist = True Exit For End If NextEnd Function Private Function IsExist(ByVal Control As String) As Boolean Dim ctl As Control IsExist = False For Each ctl In Me.Controls If ctl.Name) = Control Then IsExist = True Exit For End If NextEnd Function agree with fuxc(Michael) vb做曲线图 为什么界面大小不对呢? 各位GGJJ,请问怎样在改变系统图标后不用重启让设置生效 VS FlexGridPro能否做出解译字母的功能? 问个最笨的问题 关于inet 关于打印页边距的问题! 探讨用VB做回放音程序··>>>up者有分。。 雷锋贴:Word 合并 ! 如何给picturebox加滚动条? 关于TTS 怎么在vb中实现绿色软件? 使用ADO打开ACCESS数据库,如何取库中所有表及查询的名称呢?
Dim ctl As ControlFor Each ctl In form1.Controls
If ctl.Name = "txtname" Then
Else
End If
Next
Dim ctlOne As Control
IsExist = False
For Each ctlOne In Form1.Controls
If UCase(ctlOne.Name) = UCase(ControlName) Then
IsExist = True
Exit For
End If
Next
End Function
Dim ctl As Control
IsExist = False
For Each ctl In Me.Controls
If ctl.Name) = Control Then
IsExist = True
Exit For
End If
Next
End Function