Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 30963
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 10, 20262026-05-10T13:31:48+00:00 2026-05-10T13:31:48+00:00

In a desktop application needing some serious re-factoring, I have several chunks of code

  • 0

In a desktop application needing some serious re-factoring, I have several chunks of code that look like this:

private void LoadSettings() {     WindowState = Properties.Settings.Default.WindowState;     Location = Properties.Settings.Default.WindowLocation;     ... }  private void SaveSettings() {     Properties.Settings.Default.WindowState = WindowState;     Properties.Settings.Default.WindowLocation = Location;     ... } 

What’s the best way to replace this? Project-imposed constraints:

  • Visual Studio 2005
  • C# / .NET 2.0
  • Windows Forms

Update

For posterity, I’ve also found two useful tutorials: ‘Windows Forms User Settings in C#’ and ‘Exploring Secrets of Persistent Application Settings’.

I’ve asked a follow-up question about using this technique to bind a form’s Size here. I separated them out to help people who search for similar issues. ­­­­­­­­­­­­­­­­­­­

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. 2026-05-10T13:31:49+00:00Added an answer on May 10, 2026 at 1:31 pm

    If you open your windows form in the designer, look in the properties box. The first item should be ‘(ApplicationSetting)’. Under that is ‘(PropertyBinding)’. That’s where you’ll find the option to do exactly what you want.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have Java Desktop application that displays some information in a JTable that contains
What are some good desktop application projects I could code up that would be
I have created a desktop application in WPF that I wish to supply to
I'm developing a desktop application with .NET. I'd like to save some data into
I have developed a desktop application (.NET 2.0) and it needs to get some
I have a Java desktop application that is using iText to generate PDFs from
I have a desktop application that on first execution prompts for the connection details
For desktop application that is. This is just a general question that maybe only
I have a Java Desktop Application project created with NetBeans. The icon that is
I'm developing a desktop application in WPF, application that is manipulating a considerable amount

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.