I created a structure, with variables and controls (checkboxes, textboxes, etc.)
The declaration looks like this:
- Code: Select all
Structure Cvar
Public a_name As String
Public a_value As Integer
Public frame As GroupBox
Public combobox As ComboBox
Public checkbox1 As CheckBox
Public checkbox2 As CheckBox
End Structure
The problem is when i want to use them (
- Code: Select all
cvar(count).frame.Left = cur_X
) i get an error message:
nullreferenceexception was unhandled
The help says i should use the following method:
- Code: Select all
Public checkbox2 As New CheckBox
but the i get another error message:
Non-shared members in a Structure cannot be declared 'New'.
Thanks for any help


