You'll need to make the messages in your application use a custom form. That form will need to show the message as well as have the check box. Then you'll want to store that information somewhere. I'm going to say in the application configuration file.
So, to save the data in the configuration file, first build a few extension methods to make it easier:
public static class Extensions
{
public static void SetValue(this KeyValueConfigurationCollection o,
string key,
string val)
{
if (!o.AllKeys.Contains(key)) { o.Add(key, val); }
else { o[key].Value = val; }
}
public static string GetValue(this NameValueCollection o,
string key,
object defaultVal = null)
{
if (!o.AllKeys.Contains(key)) { return Convert.ToString(defaultVal); }
return o[key];
}
}
Then, when you want to read that value to determine if you ought to show the message, do this:
var val = (bool)ConfigurationManager.AppSettings.GetValue("ShowTheMessage");
and then when you want to save the value, do this:
var config = ConfigurationManager.OpenExeConfiguration(
ConfigurationUserLevel.None);
var app = config.AppSettings.Settings;
app.SetValue("ShowTheMessage", checkBox.Checked);
config.Save(ConfigurationSaveMode.Modified);
ConfigurationManager.RefreshSection("appSettings");