Why does my C# Config file not load the settings after saving them?

Advertisements I’m trying to write my Textbox Text into a config file in C# Winfroms to save the text. This is what I have done so far: The settings: The code to save the settings: Properties.Settings.Default.saveToTextBox = saveToTextBox.Text; The code to load the settings: saveToTextBox.Text = Properties.Settings.Default.saveToTextBox; ` And the Events FormClosed and Load to… Read More Why does my C# Config file not load the settings after saving them?

Why the richTextbox control is not location in the middle of the form1?

Advertisements private void btnSettingsFile_Click(object sender, EventArgs e) { RichTextBox rtx1 = new RichTextBox(); rtx1.Size = new Size(250,250); rtx1.BackColor = Color.Black; rtx1.ForeColor = Color.Yellow; this.Controls.Add(rtx1); rtx1.BringToFront(); rtx1.Location = new Point(this.ClientSize.Width / 2, this.ClientSize.Height / 2); rtx1.AppendText(File.ReadAllText(settingsFile)); } first I tried this.Width / 2 and this.Height / 2 but it put it on the right bottom then… Read More Why the richTextbox control is not location in the middle of the form1?

How to change drawn rectangle/s size using a trackBar1 scroll event?

Advertisements It’s a bit long, but it’s all connected. At the top of form1: List<DrawingRectangle> DrawingRects = new List<DrawingRectangle>(); The mouse events to draw the rectangles: MouseDown: private void pictureBox2_MouseDown(object sender, MouseEventArgs e) { if (e.Button != MouseButtons.Left) return; x = 0; y = 0; if (pictureBox2.Image != null && selectedPath != null) { if… Read More How to change drawn rectangle/s size using a trackBar1 scroll event?