How to Get Value from one form to another form.
-
Hi, I get stuck to retrieve value of a variable from one form to another form. What is the best option to declare global vaiable, that i require in whole project.When i Inherit the form in which that particualr variable is declared, it inherited the all controls.And automatically it embbed on another form where i want that variable value. I m using VS 2005. One more thing, what is purpose of Program.cs file, that automatically included in Project. What code we should write there. Thanks to All C# lovers. Binod
-
Hi, I get stuck to retrieve value of a variable from one form to another form. What is the best option to declare global vaiable, that i require in whole project.When i Inherit the form in which that particualr variable is declared, it inherited the all controls.And automatically it embbed on another form where i want that variable value. I m using VS 2005. One more thing, what is purpose of Program.cs file, that automatically included in Project. What code we should write there. Thanks to All C# lovers. Binod
-
Hello, This is a very very often asked question. http://www.codeproject.com/script/comments/forums.asp?msg=1902472&forumid=1649#xx1902472xx[^] All the best, Martin
-
Martin# wrote:
This is a very very often asked question.
And incorrectly answered yet again :sigh: Model-View-Controller Design Pattern[^]
led mike
led mike wrote:
And incorrectly answered yet again
No, not incorrect, maybe different! Or tell me whats incorrect at this link: http://www.codeproject.com/dotnet/passingvaluesbetweenforms.asp[^]
led mike wrote:
Model-View-Controller Design Pattern[^]
Is a nice keyword if you whant to impress somebody, but would be much more interesting with a small code example, which answers the question! I'm looking forward to your answer, as I also have no experience with MVC Design Pattern. All the best, Martin
-
led mike wrote:
And incorrectly answered yet again
No, not incorrect, maybe different! Or tell me whats incorrect at this link: http://www.codeproject.com/dotnet/passingvaluesbetweenforms.asp[^]
led mike wrote:
Model-View-Controller Design Pattern[^]
Is a nice keyword if you whant to impress somebody, but would be much more interesting with a small code example, which answers the question! I'm looking forward to your answer, as I also have no experience with MVC Design Pattern. All the best, Martin
Martin# wrote:
Is a nice keyword if you whant to impress somebody
In my experience the MVC pattern has never impressed anyone. :sigh: However it does solve many technical problems that are common to design by adhering to fundamental practices of software design discipline. Of course one of them is the question that started this thread which is, as you pointed out, very "common"... get the idea? :~
Martin# wrote:
I'm looking forward to your answer
As you might guess I did not invent the MVC pattern nor am I an expert, therefore I follow the advice of the experts, that's why they are called "experts". :doh:
Martin# wrote:
I also have no experience with MVC Design Pattern.
What about Software Design Patterns? In either case if you are serious about your career I suggest you get experience ASAP.
Martin# wrote:
but would be much more interesting with a small code example
You mean like this[^] Keep in mind that Article is just one example of a specific implementation of the MVC pattern. Another, more complex, would be the Framework provided at Microsofts Patterns and Practices[^] site.
led mike
-
Martin# wrote:
Is a nice keyword if you whant to impress somebody
In my experience the MVC pattern has never impressed anyone. :sigh: However it does solve many technical problems that are common to design by adhering to fundamental practices of software design discipline. Of course one of them is the question that started this thread which is, as you pointed out, very "common"... get the idea? :~
Martin# wrote:
I'm looking forward to your answer
As you might guess I did not invent the MVC pattern nor am I an expert, therefore I follow the advice of the experts, that's why they are called "experts". :doh:
Martin# wrote:
I also have no experience with MVC Design Pattern.
What about Software Design Patterns? In either case if you are serious about your career I suggest you get experience ASAP.
Martin# wrote:
but would be much more interesting with a small code example
You mean like this[^] Keep in mind that Article is just one example of a specific implementation of the MVC pattern. Another, more complex, would be the Framework provided at Microsofts Patterns and Practices[^] site.
led mike
Hello, I hope you don't feel that I'm kind of rude with my statements. I just wanted to point out that, specialy for a beginner who has a problem at his low level application, it's not a big help to point him to this.
led mike wrote:
What about Software Design Patterns? In either case if you are serious about your career I suggest you get experience ASAP.
I do agree, and you made me curious about that.
led mike wrote:
You mean like this[^]
I had a short watch, and have to say that it's not much diverent then the article of Colin Angus Mackay, as he also explains the usage of delegates.
led mike wrote:
Keep in mind that Article is just one example of a specific implementation of the MVC pattern. Another, more complex, would be the Framework provided at Microsofts Patterns and Practices[^] site.
Thank you for that interensting link. All the best, Martin
-
Hello, I hope you don't feel that I'm kind of rude with my statements. I just wanted to point out that, specialy for a beginner who has a problem at his low level application, it's not a big help to point him to this.
led mike wrote:
What about Software Design Patterns? In either case if you are serious about your career I suggest you get experience ASAP.
I do agree, and you made me curious about that.
led mike wrote:
You mean like this[^]
I had a short watch, and have to say that it's not much diverent then the article of Colin Angus Mackay, as he also explains the usage of delegates.
led mike wrote:
Keep in mind that Article is just one example of a specific implementation of the MVC pattern. Another, more complex, would be the Framework provided at Microsofts Patterns and Practices[^] site.
Thank you for that interensting link. All the best, Martin