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. form return problem!

form return problem!

Scheduled Pinned Locked Moved C#
4 Posts 2 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.
  • M Offline
    M Offline
    motojojo
    wrote on last edited by
    #1

    Hi folks, Here's my problem: (and the source of my frustrations) I'm writing an app to control a service.. Now, the settings of this service are kept in a serialized file, which is the serialized form of my configuration - object... The user should be able to specify certain settings by pressing a button, so what I do is passing an instance of the configuration class to the SettingsForm. e.g. frmSettings formsettings = new frmSettings(myConfiguration); now for the big question: How can that frmSettings RETURN the modified myConfiguration to the parentform without having to go to the trouble of serializing the stuff, writing it to the disk and deserializing it again in the parent form... Thank you very much for your response! A young c# programmer:)

    C 1 Reply Last reply
    0
    • M motojojo

      Hi folks, Here's my problem: (and the source of my frustrations) I'm writing an app to control a service.. Now, the settings of this service are kept in a serialized file, which is the serialized form of my configuration - object... The user should be able to specify certain settings by pressing a button, so what I do is passing an instance of the configuration class to the SettingsForm. e.g. frmSettings formsettings = new frmSettings(myConfiguration); now for the big question: How can that frmSettings RETURN the modified myConfiguration to the parentform without having to go to the trouble of serializing the stuff, writing it to the disk and deserializing it again in the parent form... Thank you very much for your response! A young c# programmer:)

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

      Read this article on how to pass values between forms[^].


      Upcoming events: * Edinburgh: Web Security Conference Day for Windows Developers (12th April) * Glasgow: Introduction to AJAX (2nd May), SQL Server, Mock Objects My website

      M 1 Reply Last reply
      0
      • C Colin Angus Mackay

        Read this article on how to pass values between forms[^].


        Upcoming events: * Edinburgh: Web Security Conference Day for Windows Developers (12th April) * Glasgow: Introduction to AJAX (2nd May), SQL Server, Mock Objects My website

        M Offline
        M Offline
        motojojo
        wrote on last edited by
        #3

        I don't see the solution here on first sight.. I'm really trying to return an instance of an object (not a value) when the user chooses to commit the changes...

        C 1 Reply Last reply
        0
        • M motojojo

          I don't see the solution here on first sight.. I'm really trying to return an instance of an object (not a value) when the user chooses to commit the changes...

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

          motojojo wrote:

          I'm really trying to return an instance of an object

          Yes, and a value is.... an instance of an object.


          Upcoming events: * Edinburgh: Web Security Conference Day for Windows Developers (12th April) * Glasgow: Introduction to AJAX (2nd May), SQL Server, Mock Objects My website

          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