![]() |
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Programmer
|
Hi all
I've got kinda stuck with my C# program. I'm trying to transfer a variable (lets say and int) from one windows form to another, both in the same program, almost like a dialog, but i want to be able to transfer variables between both forms. I know it can be done, i see it in so many programs that i use every day, but i cant pinpoint exactly what it is, its been bugging me for a week or so and i cant really do much more until i get this fixed. Any help or clues to send me in the right direction would be much appreciated. I'm using Visual C# 2005 and the .net 2.0 framework Thanks very much Nez
__________________
atariboy.wordpress.com |
|
|
|
|
|
#2 |
|
Programming Guru
![]() Join Date: Jun 2005
Location: elemental plane
Posts: 1,429
Rep Power: 5
![]() |
You can make use of properties, you can also make them protected or public, the latter is discouraged, because global variables can confuse you, and in turn will confuse your compiler or program if you misuse them.
BTW: Your link in your signature is leads to http://atariboy.wordpress.com/%3Cbr%20/%3EBlog.
__________________
"Employ your time in improving yourself by other men's writings, so that you shall gain easily what others have labored hard for." -- Socrates |
|
|
|
|
|
#3 |
|
Programmer
|
So it does, thanks nnxion, at least you've given me some things to look into, cheers
updated my sig too ![]()
__________________
atariboy.wordpress.com |
|
|
|
|
|
#4 |
|
Programmer
|
I'm looking in and around static/instance variables, is that the right kind of area?
Although like you said nnxion, i'm seeing a lot of warnings about static variables and how i should not really use them or maybe MDI is the way to go?
__________________
atariboy.wordpress.com Last edited by nez; Mar 7th, 2006 at 6:19 AM. |
|
|
|
|
|
#5 |
|
Programmer
|
Any ideas anyone? this is doing my head in, i know its possible, and i think im close, but i'm just not sure exactly how, and i dont want to use MDI either.
Any help would be good, thanks Nez Edit: Got it now, thanks nnxion
__________________
atariboy.wordpress.com Last edited by nez; Mar 7th, 2006 at 1:48 PM. |
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|