You can also create application settings using the Settings tab of the Project Designer window. This window is displayed if you select Properties under the Project menu or if you right-click the project in Solution Explorer and select Properties from the context menu. Here's a view showing what that looks like:
--------
Click Here to display the illustration
Click the Back button on your browser to return
--------
Remember to select System.Drawing.Color as the setting Type and select a color value in the Value column.
But you don't get quite the same result doing it this way. The setting isn't bound to the control (in this case, the Form) and you have to do that with code. (Event parameters are omitted to keep lines shorter.)
Private Sub Button1_Click( ...
ColorDialog1.ShowDialog()
My.Settings.MyBackColor = ColorDialog1.Color
Me.BackColor = ColorDialog1.Color ' <- added
End Sub
Private Sub Form1_Load( ...
Me.BackColor = My.Settings.MyBackColor ' <- added
End Sub
There is also one more feature. You can also generate a template Settings.vb file by clicking the View Code button. View Code, does more than just view the code. This button also generates the file to view. The helpful comments - see the illustration below - in the generated code tell you what you need to know. Just add the code for the event you need to handle in this window.
--------
Click Here to display the illustration
Click the Back button on your browser to return
--------
The Settings tab of the Project Designer window is the only way to remove a setting, (select the row, right-click, and select Remove Setting).
Since the app.config file is a key part of this. The next page tells you how that works.

