Dim frm = Windows.Forms.Form.ActiveForm If frm IsNot Nothing Then If frm.Name = "Class185" AndAlso user.Type = UserTypeEnum.Administrator Then 'For Each c As object In frm.controls 'output.show(c.name & c.text) 'Next frm.controls("btnDelete").enabled = False frm.controls("btnAdd").enabled = False End If End If