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