I am trying to write an application that allow the user to select prefered colour from displayed colour dialog, but when the colour selected and the application is closed and reopened it doesn't open with the selected colour. I tried to write the code in the form load event as well but it gives an error message that no value is selected. The code below is the code i used in changing the form background and other components on the form which work successfully but making permanent is a problem. I will appreciate it if some out there can give me a clue on how to retain the selected colour. Thank you (I am working on visual studio 2003)
dlgcolor.SolidColorOnly = True
If dlgcolor.ShowDialog = Windows.Forms.DialogResult.OK Then
myform2.BackColor = dlgcolor.Color
GroupBox1.BackColor = dlgcolor.Color
dtp1.CalendarMonthBackground = dlgcolor.Color
dtp1.CalendarTitleBackColor = dlgcolor.Color
txtevent.BackColor = dlgcolor.Color
txtdate.BackColor = dlgcolor.Color
txttime.BackColor = dlgcolor.Color
txtvenue.BackColor = dlgcolor.Color
End If