dcsimg
Results 1 to 5 of 5

Thread: [RESOLVED] Saving All Changes For All Controls Location,Size and Texts?

  1. #1

    Thread Starter
    Hyperactive Member Joye's Avatar
    Join Date
    Jul 2009
    Posts
    256

    Resolved [RESOLVED] Saving All Changes For All Controls Location,Size and Texts?

    I wonder if there is a simple code that could save all controls locations X & Y for all controls,sizes and Texts as it is after closing the form?
    So what ever on that form can be changed, it can be saved as it's in Form closing.

    And I'm not talking about saving that on project settings one by one. I need a simple way or code for that and it might be from settings.
    There must be a simple way to save them right?

  2. #2
    Sinecure devotee
    Join Date
    Aug 2013
    Location
    Southern Tier NY
    Posts
    5,754

    Re: Saving All Changes For All Controls Location,Size and Texts?

    If you want it to be on a user basis, I just click on the control, go to the properties window. At the top is a entry that says (Application Settings), under that will be the main properties of the control that can have code generated automatically to save and restore the property when you exit and restart the application. You click on the property, and assign a setting name to associate with the property and you're done. That properties value will be stored on exit, and restored on startup without you writing any specific code. Normally, the user can't move controls, so location information may not be part of the user settings that are savable automatically.

    If you are allowing the user to change things that are not changeable by the user normally, then you will have to add those settings yourself.

  3. #3

    Thread Starter
    Hyperactive Member Joye's Avatar
    Join Date
    Jul 2009
    Posts
    256

    Re: Saving All Changes For All Controls Location,Size and Texts?

    Quote Originally Posted by passel View Post
    If you want it to be on a user basis, I just click on the control, go to the properties window. At the top is a entry that says (Application Settings), under that will be the main properties of the control that can have code generated automatically to save and restore the property when you exit and restart the application. You click on the property, and assign a setting name to associate with the property and you're done. That properties value will be stored on exit, and restored on startup without you writing any specific code. Normally, the user can't move controls, so location information may not be part of the user settings that are savable automatically.

    If you are allowing the user to change things that are not changeable by the user normally, then you will have to add those settings yourself.
    I can't believe that worked

    It really saved me a lot of time and effort
    and guess what?
    In my project user can move some controls, location information are part of the user settings and they are savable.

  4. #4
    .NUT jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    104,181

    Re: Saving All Changes For All Controls Location,Size and Texts?

    If your issue has been resolved, please use the Thread Tools menu to mark the thread Resolved.

  5. #5

    Thread Starter
    Hyperactive Member Joye's Avatar
    Join Date
    Jul 2009
    Posts
    256

    Resolved Re: Saving All Changes For All Controls Location,Size and Texts?

    Quote Originally Posted by jmcilhinney View Post
    If your issue has been resolved, please use the Thread Tools menu to mark the thread Resolved.
    Done ✅

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Featured


Click Here to Expand Forum to Full Width