Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

Settings Page, Project Designer

Use the Settings page of the Project Designer to specify the project's application settings. Application settings allow you to store and retrieve property settings and other information for your application dynamically, and they allow you to maintain custom application and user preferences on the client computer. For more information, see Application Settings.

To access the Settings page, select a project node in Solution Explorer, then on the Project menu, click Properties. When the Project Designer appears, click the Settings tab.

Header Bar

The following controls are located at the header bar at the top of the Settings page.

Synchronize

Restores user-scoped settings that the application uses at run time (or during debugging) to their default values as defined at design time. The data is restored by removing runtime-generated, application-specific files from disk (not from project data).

View Code

For Visual Basic projects, navigates to the code in the Settings.vb file. This file defines the MySettings class, which allows you to handle specific events on the My.Settings object. For more information on accessing application settings using the My.Settings object, see Accessing Application Settings.

For Visual C# projects, navigates to the code in the Settings.cs file. This file defines the Settings class, which allows you to handle specific events on the Settings object. Note that in languages other than Visual Basic, you must explicitly call the Save method of this wrapper class in order to persist the user settings. You usually do this in the Closing event handler of the main form. For more information on accessing application settings, see Application Settings for Windows Forms.

Settings Grid

The settings grid is used to configure the application settings.

The following table has been updated for Visual Studio 2005 SP1.

Name

Enter the name of the application setting in this field.

Type

Use the drop-down list to select a type for the setting. The most commonly used types appear in the drop-down list—for example, String, connection string, System.Drawing.Font, and so on. You can select another type by selecting Browse at the end of the list, and choosing a type from the Select a Type Dialog Box. Notice that after you have selected a type from this dialog box, that type is added to the common types in the drop-down list (for the current solution only).

Scope

The Scope can be Application or User.

Application-scoped settings (such as connection strings) are associated with the application; users cannot change them at run time.

User-scoped settings (such as system fonts) are intended for user preferences; users can change them at run time.

In Visual Studio 2005 SP1, Web application projects have been added to Visual Studio 2005. Note that Web application projects can only be application-scoped.

Value

The data or value associated with the application setting. For example, if the setting is a font, its value could be Verdana, 9.75pt, style=Bold.

See Also

Was this page helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

Show:
© 2014 Microsoft