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 save Form what ever we create on it? ?

How to save Form what ever we create on it? ?

Scheduled Pinned Locked Moved C#
helpcsharptutorialquestion
5 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.
  • M Offline
    M Offline
    Member 1479694
    wrote on last edited by
    #1

    I have from in C#, i am creating some panels on it at run time and add some forms into those panels i need to save form sate in a way so that when i close my form it should save what ever i draw on it. and when re open it ... it should show me last contains which i draw on form.. Help me in this regards i m really stuck in this issue..

    C S 2 Replies Last reply
    0
    • M Member 1479694

      I have from in C#, i am creating some panels on it at run time and add some forms into those panels i need to save form sate in a way so that when i close my form it should save what ever i draw on it. and when re open it ... it should show me last contains which i draw on form.. Help me in this regards i m really stuck in this issue..

      C Offline
      C Offline
      Christian Graus
      wrote on last edited by
      #2

      It's really easy. You have to write code to do it. When your form closes, it fires and event. When it opens, it fires an event. Catch both, in one write the values where-ever you like, read them from the other and put them in the form.

      Christian Graus Driven to the arms of OSX by Vista.

      1 Reply Last reply
      0
      • M Member 1479694

        I have from in C#, i am creating some panels on it at run time and add some forms into those panels i need to save form sate in a way so that when i close my form it should save what ever i draw on it. and when re open it ... it should show me last contains which i draw on form.. Help me in this regards i m really stuck in this issue..

        S Offline
        S Offline
        Sunil Lanke
        wrote on last edited by
        #3

        [Message Deleted]

        C 1 Reply Last reply
        0
        • S Sunil Lanke

          [Message Deleted]

          C Offline
          C Offline
          Christian Graus
          wrote on last edited by
          #4

          What the hell ? What does the singleton pattern have to do with persisting settings ?

          Christian Graus Driven to the arms of OSX by Vista.

          S 1 Reply Last reply
          0
          • C Christian Graus

            What the hell ? What does the singleton pattern have to do with persisting settings ?

            Christian Graus Driven to the arms of OSX by Vista.

            S Offline
            S Offline
            Sunil Lanke
            wrote on last edited by
            #5

            Hey, I think i dint got your question properly, can u let me know that, the form which you are closing is Main form of the Application or child form. If it is main form then you need to capture the "form load" and "form closing" event of the form, and write your own code to save the settings on closing, and load the settings when the form is loaded. :)

            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