Home All Groups Group Topic Archive Search About

Passing data between forms: tag is ok?

Author
8 May 2006 7:54 AM
Adam Honek
I want to pass one little piece of data between forms in the same thread.

May I still safely use the .tag property of each form to do so?

It's only an integer value I need to pass and would rather not use global
variables
unless I have to.

Thanks,
Adam

Author
8 May 2006 8:43 AM
Adam Honek
It's ok, did it via the tag method and it works fine or so it seems.

Adam

Show quoteHide quote
"Adam Honek" <AdamHo***@Webmaster2001.freeserve.co.uk> wrote in message
news:%23MO5jSncGHA.3840@TK2MSFTNGP04.phx.gbl...
>I want to pass one little piece of data between forms in the same thread.
>
> May I still safely use the .tag property of each form to do so?
>
> It's only an integer value I need to pass and would rather not use global
> variables
> unless I have to.
>
> Thanks,
> Adam
>
Author
8 May 2006 9:38 AM
Herfried K. Wagner [MVP]
"Adam Honek" <AdamHo***@Webmaster2001.freeserve.co.uk> schrieb:
>I want to pass one little piece of data between forms in the same thread.
>
> May I still safely use the .tag property of each form to do so?

Yes, you can do that.  However, maybe adding typed properties with
meaningful names to the form instead of using the generic 'Tag' property is
the preferrable choice.

--
M S   Herfried K. Wagner
M V P  <URL:http://dotnet.mvps.org/>
V B   <URL:http://classicvb.org/petition/>
Author
9 May 2006 1:30 AM
aaron.kempf@gmail.com
why you so scared of global variables?

i mean; this isn't witchcraft just because some renob says you
shouldn't do it-- did you test it and had unacceptable performance with
global variables??