vb.net 2k5 Labels BorderStyle is not a member of system.windows.forms.control
I am doing this in vb.net 2K5 The code below is in a module trying to edit the main form’s label control. The error message is: BorderStyle is not a member of System.Windows.Forms.Control. When it is able to be set in the property window and you can do Label1.BorderStyle = BorderStyle.None in the Form’s Code. The ProblemFor Each ctrl As Control In Form.Controls ctrl.BorderStyle = BorderStyle.None Next |
For Each ctrl As Control In Form.Controls Try Dim sc As System.Windows.Forms.Label = DirectCast(ctrl, System.Windows.Forms.Label) sc.BorderStyle = myBorderStyle Catch ’Do nothing. End Try Next |
Post a comment for www.mgwalk.com

