![]() |
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Hobbyist Programmer
Join Date: Oct 2006
Posts: 146
Rep Power: 2
![]() |
sharing variables between two forms
i tried google, MSDN, my teacher, my book...
how can i share variables between two different forms?? like access a variable assigned a value in Form1 from Form2 |
|
|
|
|
|
#2 | |
|
Professional Programmer
Join Date: May 2006
Location: UK - London
Posts: 327
Rep Power: 3
![]() |
I think you should try to place the variable you want to share between the forms in an module (i think thats the correct name), and make sure the variable is public so that both forms can access it.
__________________
Quote:
|
|
|
|
|
|
|
#3 |
|
Hobbyist Programmer
Join Date: Oct 2006
Posts: 146
Rep Power: 2
![]() |
ok. thanks. now i have to learn how to make a module and ill update my graphing calc project posted on this site.
|
|
|
|
|
|
#4 |
|
Hobbyist Programmer
Join Date: Oct 2006
Posts: 146
Rep Power: 2
![]() |
ok how do i make a module. i read up on it and MSDN said that i have to make a dll file? but it didnt show how to organize it codewise...
like i have a module and all it says now it declaring the variables i want to share as global. now how do i assign the value of those variables in the code window. cause i have same lettered variables in both forms os how does it know which variable from form1 to assign a stored value to pass on to the second form |
|
|
|
|
|
#5 |
|
Hobbyist Programmer
Join Date: Oct 2006
Posts: 146
Rep Power: 2
![]() |
nvm i got it. thanks guys
|
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Storing Variables with Multiple Dialogs/Forms | PhilBon | Visual Basic .NET | 6 | Oct 11th, 2006 7:14 AM |
| Variables between forms | nez | C# | 4 | Mar 7th, 2006 1:24 PM |
| Sharing Objects Between Forms | Kilo | C# | 26 | Dec 12th, 2005 6:25 PM |
| Variables | coldDeath | Python | 4 | Aug 9th, 2005 11:35 AM |
| Websites and forms. With VB | scorpiosage | Visual Basic .NET | 1 | Feb 1st, 2005 3:21 AM |