I went for the run, but it actually turned out to be worse than yesterday. You see, just after I started running I got a headache, and I decided that it probably was not the wisest move to continue running. I did get about 500m run, and then I walked for about another 1km to get some exercise.

One of the other things that I was doing last night was helping a friend with some VB.NET code. He was having an issue accessing dynamically generated attributes on a form once they were created. I suggested my.controls.item(2), but this did not seem to work as the paramaters that he was after were missing. So my.controls.item(2).text = “Hello” does work even if the .text is not in the dropdown list.

It turns out that the item is ‘late bound’ meaning that the type is not known at design time. This means that you just need to make sure that you get what follows right and it will work. Or there is another way.

dim tb as textbox
tb = my.controls.item(2)
tb.text = “Hello”

Since the DIM is missing a new (as in dim tb as new textbox), it is only a pointer to it and you can simply assign a control from another pointer to it… And things just work!