加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 百科 > 正文

VB.Net思路:检查控件,设置控件权限

发布时间:2020-12-17 08:03:29 所属栏目:百科 来源:网络整理
导读:Public Class NFWindowsControl Inherits Windows.Forms.Form Public Sub New() checkPermission() ' ' ' End Sub Public Function checkPermission() End Function Protected _SystemFunctionID As String Public Property SystemFuntionID() As String Get
Public Class NFWindowsControl
    Inherits Windows.Forms.Form

    Public Sub New()
        checkPermission()
        '
        '
        '
    End Sub

    Public Function checkPermission()

    End Function

    Protected _SystemFunctionID As String

    Public Property SystemFuntionID() As String
        Get
            Return _SystemFunctionID
        End Get
        Set(value As String)
            _SystemFunctionID = value
        End Set
    End Property

    Private Sub NFWindowsControl_Load(sender As Object,e As System.EventArgs) Handles Me.Load

    End Sub
End Class
    Dim mitButton As ToolStripMenuItem	
            For Each obj In Me.Controls	
                If TypeOf (obj) Is ToolStripMenuItem Then	
                    mitButton = obj	

                    Dim s() As String	

                    s = Split(mitButton.Tag,";")	

                End If	
            Next	
if typeof(obj) is … Then
select case typeof(obj)
case label or button
.visible or .enable

case textbox
.readonly
.visible

case button

end select 
end if

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读