Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. How to Get Value from one form to another form.

How to Get Value from one form to another form.

Scheduled Pinned Locked Moved C#
csharpvisual-studiohelptutorialquestion
7 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • B Offline
    B Offline
    Binod K
    wrote on last edited by
    #1

    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

    M 1 Reply Last reply
    0
    • B Binod K

      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

      M Offline
      M Offline
      Martin 0
      wrote on last edited by
      #2

      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

      L 1 Reply Last reply
      0
      • M Martin 0

        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

        L Offline
        L Offline
        led mike
        wrote on last edited by
        #3

        Martin# wrote:

        This is a very very often asked question.

        And incorrectly answered yet again :sigh: Model-View-Controller Design Pattern[^]

        led mike

        M 1 Reply Last reply
        0
        • L led mike

          Martin# wrote:

          This is a very very often asked question.

          And incorrectly answered yet again :sigh: Model-View-Controller Design Pattern[^]

          led mike

          M Offline
          M Offline
          Martin 0
          wrote on last edited by
          #4

          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

          L 1 Reply Last reply
          0
          • M Martin 0

            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

            L Offline
            L Offline
            led mike
            wrote on last edited by
            #5

            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

            M 1 Reply Last reply
            0
            • L 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

              M Offline
              M Offline
              Martin 0
              wrote on last edited by
              #6

              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

              L 1 Reply Last reply
              0
              • M Martin 0

                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

                L Offline
                L Offline
                led mike
                wrote on last edited by
                #7

                Martin# wrote:

                I hope you don't feel that I'm kind of rude with my statements.

                Nope.

                Martin# wrote:

                Thank you for that interensting link.

                your welcome and CP has a Design and Architecture forum should you have more questions on the subject.

                led mike

                1 Reply Last reply
                0
                Reply
                • Reply as topic
                Log in to reply
                • Oldest to Newest
                • Newest to Oldest
                • Most Votes


                • Login

                • Don't have an account? Register

                • Login or register to search.
                • First post
                  Last post
                0
                • Categories
                • Recent
                • Tags
                • Popular
                • World
                • Users
                • Groups