Reputation: 519
Say I have a form application, and I draw a circle inside of it. Could I store a variable inside that circle object? Something like this?
Dim circle1.testVar As Integer = 1
Would that work, and is there a way to do this if it won't?
Upvotes: 1
Views: 67
Reputation: 152566
No, you cannot dynamically add properties to a Control
. you can use the existing Tag
property of a control:
circle1.Tag = 1
Unfortunately Tag
is of type Object
so you're going to have to check for Nothing
and/or cast the value when you retrieve it.
Upvotes: 2