Static and Friend

  • Thread starter Thread starter webwing
  • Start date Start date
W

webwing

Hi,

Can someone help please.

Basicaly I need to read a registration number across several forms in
my project.
The user logs in and I will use this number accross the forms
I have tried to store it in a Friend variable but once i hide the
first form and go to the next form the value goes to 0.
If I declare it Static then it is only usefull in one form.

What is the best way to do this?

Thanks
 
webwing said:
Can someone help please.

Basicaly I need to read a registration number across several forms in
my project.
The user logs in and I will use this number accross the forms
I have tried to store it in a Friend variable but once i hide the
first form and go to the next form the value goes to 0.
If I declare it Static then it is only usefull in one form.

What is the best way to do this?

I didn't know VB.NET even had a Static modifier - I'll have to look
that up. I think what you need is Shared and Friend though.
 
Webwing,

What program language are you using because the keyword static have in VBNet
and C# complete different meanings. (And probably the reason why Shared is
used for what is in C# Static)

I would ask it than in the newsgroup.
language.public.dotnet.languages.vb or charp

I hope this helps?

Cor
 
Back
Top