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
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. C#
  4. Passing Values

Passing Values

Scheduled Pinned Locked Moved C#
winforms
7 Posts 6 Posters 2 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.
  • D Offline
    D Offline
    Dylan van Heerden
    wrote on last edited by
    #1

    How many ways are there to pass values in windows forms. My brain is 2 small for all the knowledge that I need.

    D C M 3 Replies Last reply
    0
    • D Dylan van Heerden

      How many ways are there to pass values in windows forms. My brain is 2 small for all the knowledge that I need.

      D Offline
      D Offline
      Dave Kreskowiak
      wrote on last edited by
      #2

      Lots! Are you asking about a particular method? What exactly are you having problems with? RageInTheMachine9532 "...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome

      A 1 Reply Last reply
      0
      • D Dylan van Heerden

        How many ways are there to pass values in windows forms. My brain is 2 small for all the knowledge that I need.

        C Offline
        C Offline
        Colin Angus Mackay
        wrote on last edited by
        #3

        _Hacker wrote: My brain is 2 small for all the knowledge that I need What a curious thing to say. It is commonly known that humans generally do not exceed 10% usage of their brain's capacity. Therefore it is more likely that you are not utilising the capacity you have efficiently. If you search Amazon for the author "Tony Buzan" you should find some books on how to more effectively utilise your brain so that you retain and recall information more efficiently. Does this help? :rolleyes:


        "If a man empties his purse into his head, no man can take it away from him, for an investment in knowledge pays the best interest." -- Joseph E. O'Donnell The Second EuroCPian Event will be in Brussels on the 4th of September Can't manage to P/Invoke that Win32 API in .NET? Why not do interop the wiki way!

        D 1 Reply Last reply
        0
        • D Dave Kreskowiak

          Lots! Are you asking about a particular method? What exactly are you having problems with? RageInTheMachine9532 "...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome

          A Offline
          A Offline
          Anonymous
          wrote on last edited by
          #4

          I want to open a new form and then retrieve a few values from the new form.

          R 1 Reply Last reply
          0
          • C Colin Angus Mackay

            _Hacker wrote: My brain is 2 small for all the knowledge that I need What a curious thing to say. It is commonly known that humans generally do not exceed 10% usage of their brain's capacity. Therefore it is more likely that you are not utilising the capacity you have efficiently. If you search Amazon for the author "Tony Buzan" you should find some books on how to more effectively utilise your brain so that you retain and recall information more efficiently. Does this help? :rolleyes:


            "If a man empties his purse into his head, no man can take it away from him, for an investment in knowledge pays the best interest." -- Joseph E. O'Donnell The Second EuroCPian Event will be in Brussels on the 4th of September Can't manage to P/Invoke that Win32 API in .NET? Why not do interop the wiki way!

            D Offline
            D Offline
            Dylan van Heerden
            wrote on last edited by
            #5

            This is just my signature... Thanks anyway. My brain is 2 small for all the knowledge that I need.

            1 Reply Last reply
            0
            • D Dylan van Heerden

              How many ways are there to pass values in windows forms. My brain is 2 small for all the knowledge that I need.

              M Offline
              M Offline
              Michael P Butler
              wrote on last edited by
              #6

              _Hacker wrote: How many ways are there to pass values in windows forms. I like my forms to fire events when values change or certain actions such as save are made. Alternativly. get and setting of public Properties is also good. A lot depends on your model of development and what the values are being passed for. Michael CP Blog [^]

              1 Reply Last reply
              0
              • A Anonymous

                I want to open a new form and then retrieve a few values from the new form.

                R Offline
                R Offline
                Robert Rohde
                wrote on last edited by
                #7

                Dirty Method: Make all controls of the form public. Then you have complete access to everything. Clean: - Make public/internal properties/methods to read the values from the form. - Let the form fire events when values are changed. These could be handled and evaluated. If the new form ist shown modal you can also: - Define a function in the new form which will show it modal and return the value you need. If you need more than one value you could insert some out/ref-parameters. There will be thousands of possibilities to exchange values, but I think you should try it with properties (as mentioned above)

                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