zoukankan      html  css  js  c++  java
  • VB下判断控件是否存在的函数


    '*******************************************************
    '*函数功能:判断控件是否存在的函数
    '*参        数:frmObject    窗体名
    '*                  strControlsName   待判断的控件名
    '*                  lngIndex                 控件Index         非数组控件可省略该参数
    '*返  回  值:True 存在    False  不存在
    '*******************************************************
    Function fChkControls(frmObject As Form, strControlsName As String, Optional lngIndex As Long = -1) As Boolean
    On Error GoTo Err
        Dim strContrName As String
        If lngIndex >= 0 Then
            strContrName = frmObject.Controls(strControlsName)(lngIndex).Name
        Else
            strContrName = frmObject.Controls(strControlsName).Name
        End If
        fChkControls = True
        Exit Function
    Err:
        fChkControls = False
    End Function
  • 相关阅读:
    2014/11/25 函数
    2014/11/24 条件查询
    2、计算器
    1、winform数据库调用(基本方法)
    1、网页基础
    14、函数输出参数、递归
    13、C#简易版 推箱子游戏
    12、函数
    11、结构体、枚举
    10、特殊集合
  • 原文地址:https://www.cnblogs.com/topboy168/p/823709.html
Copyright © 2011-2022 走看看