Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Who to make global project variables

Status
Not open for further replies.

Boticas

Programmer
Apr 24, 2002
5
0
0
PT
I pass to describe my problem
I got tow forms in my VB.Net project and when one form calls the other I whish that the second form could access and read the values of some variables of the first form

In VB6 this was possible using a module and in that module we define de global variables, but in VB.Net who we do that?

Thanks.
 
I believe you should be able to do it more or less the same way, .NET still has modules.
 
This is what I do:

I have a class named UBP1 with:
Public Shared gBackGoundColor As System.Drawing.Color = System.Drawing.Color.LightBlue


Then in the form/class I want to use it.

Private UBP1 As New UBDA.UBProcs1()

Textbox1.BackColor = UBP1.gBackGroundColor
 
Please see thread796-286474, where this is covered.

Chip H.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top