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 (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |