object in textbox.text

  • Thread starter Thread starter Frank
  • Start date Start date
F

Frank

Hello,
I use the tag of a textbox to store the address of a structure:
uFormTag = New formTag()

Me.Tag = uFormTag

First question: is that the rigth way to do it? Or should it be

tag=addressof uformtag

Second question: how do I pull the info out of the tag? How do I use the
address in there to get to the info in the structure?

Thanks

Frank
 
Hi,

Use Me.Tag = uFormTag.

To retrieve
Dim uFormTag as FormTag = Directcast(me.tag,FormTag)


Ken
------------------
 
* "Frank said:
I use the tag of a textbox to store the address of a structure:
uFormTag = New formTag()

Me.Tag = uFormTag

First question: is that the rigth way to do it? Or should it be

tag=addressof uformtag

\\\
Me.Tag = uFormTag
///

If the type of 'uFormTag' is a structure (value type), a copy of the
"object" will be created. If you want to assign a reference, use a
class instead of the structure.
Second question: how do I pull the info out of the tag? How do I use the
address in there to get to the info in the structure?

\\\
foo = DirectCast(Me.Tag, Goo)
///

.... assuming 'Goo' is the type of the object assigned to 'Me.Tag'.
 
Back
Top