rewrite this c# code adding appropriate comments where needed and also adding try catch blocks where needed:
using static System.Windows.Forms.VisualStyles.VisualStyleElement.ListView;
using static System.Windows.Forms.VisualStyles.VisualStyleElement.StartPanel;
using System.Collections.Generic;
using System.Data.OleDb;
using System.Net;
using System.Windows.Forms;
using System;
using System.Linq;

namespace ApplianceRental
{
    public partial class RegistrationForm : Form
    {
        private readonly OleDbConnection connection = new OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=db_users.mdb");

        public RegistrationForm()
        {
            InitializeComponent();
        }

        private void Register_Click(object sender, EventArgs e)
        {
            if (string.IsNullOrEmpty(textBox1.Text))
            {
                MessageBox.Show("Please enter a username.");
                return;
            }

            if (string.IsNullOrEmpty(textBox2.Text))
            {
                MessageBox.Show("Please enter a password.");
                return;
            }

            if (textBox2.Text != textBox3.Text)
            {
                MessageBox.Show("Passwords do not match.");
                return;
            }

            if (string.IsNullOrEmpty(textBox4.Text))
            {
                MessageBox.Show("Please enter your full name.");
                return;
            }

            if (string.IsNullOrEmpty(textBox5.Text))
            {
                MessageBox.Show("Please enter your email address.");
                return;
            }

            if (string.IsNullOrEmpty(textBox6.Text))
            {
                MessageBox.Show("Please enter your address.");
                return;
            }

            if (textBox2.Text.Length < 8 || textBox2.Text.Length > 16)
            {
                MessageBox.Show("Password must be between 8 and 16 characters.");
                return;
            }

            if (!textBox2.Text.Any(char.IsLower) || !textBox2.Text.Any(char.IsUpper))
            {
                MessageBox.Show("Password must contain at least one lowercase and one uppercase letter.");
                return;
            }

            connection.Open();

            using (var cmd = new OleDbCommand())
            {
                cmd.Connection = connection;
                cmd.CommandText = "INSERT INTO tbl_users(username, [password], fullname, email, address, [User Type]) " +
                    "VALUES(@username, @password, @fullname, @email, @address, 'Customer')";

                cmd.Parameters.AddWithValue("@username", textBox1.Text);
                cmd.Parameters.AddWithValue("@password", textBox2.Text);
                cmd.Parameters.AddWithValue("@fullname", textBox4.Text);
                cmd.Parameters.AddWithValue("@email", textBox5.Text);
                cmd.Parameters.AddWithValue("@address", textBox6.Text);

                cmd.ExecuteNonQuery();
            }

            MessageBox.Show("Registration successful!");
            ClearFields();
            this.Hide();
            new Form1().Show();

            connection.Close();
        }

        private void ClearFields()
        {
            textBox1.Text = "";
            textBox2.Text = "";
            textBox3.Text = "";
            textBox4.Text = "";
            textBox5.Text = "";
            textBox6.Text = "";
        }
        private void textBox1_TextChanged(object sender, EventArgs e)
        {
        }

        private void textBox2_TextChanged(object sender, EventArgs e)
        {
        }

        private void textBox3_TextChanged(object sender, EventArgs e)
        {
        }

        private void textBox4_TextChanged(object sender, EventArgs e)
        {
        }

        private void textBox5_TextChanged(object sender, EventArgs e)
        {
        }

        private void textBox6_TextChanged(object sender, EventArgs e)
        {
        }
    }
}