private void SaveSetting() { Properties.Settings.Default["SettingEnable"] = true; Properties.Settings.Default["Location"] = this.Location; Properties.Settings.Default["Size"] = this.Size; Properties.Settings.Default["ForeColor"] = textBox1.ForeColor; Properties.Settings.Default["Font"] = textBox1.Font; Properties.Settings.Default["WordWrap"] = textBox1.WordWrap; Properties.Settings.Default["StatusBarEnable"] = this.statusbarToolStripMenuItem.Checked; Properties.Settings.Default["TopMostEnable"] = this.TopMost; Properties.Settings.Default["FormOpacity"] = (float)this.Opacity; if (this.imgForm != null) { Properties.Settings.Default["BgImgFlag"] = true; Properties.Settings.Default["BackImg"] = this.FilePath; Properties.Settings.Default["ImgOpacity"] = (float)this.imgForm.Opacity; if (this.imgForm.PictureBox1.SizeMode == PictureBoxSizeMode.StretchImage) Properties.Settings.Default["Stretch"] = true; else Properties.Settings.Default["Stretch"] = false; } else { Properties.Settings.Default["BgImgFlag"] = false; Properties.Settings.Default["BackColor"] = textBox1.BackColor; } Properties.Settings.Default.Save(); }