i have a multi line text box that i would like to log messages to from other classes

however i am getting a infinite loop in class creation.

What is the correct way of update form controls from outside the form class?

```
namespace Program
{

    public partial class MainForm : Form
    {
        engine connEngine = new engine();

        public MainForm()
        {
            InitializeComponent();

        }

        private void Start_Click(object sender, EventArgs e)
        {
            msgLog("Connection Start Clicked");

            if (connEngine.StartConnection(txtIPAddress.Text, 8002) == false)
            {
                msgLog("Connection Start Failed"); 
            }
            else
            {
                msgLog("Connection Start Success");
            }

        }

        public void msgLog(string message)
        {
            txtMessageLog.AppendText(message + Environment.NewLine);
        }

        private void MainForm_Load(object sender, EventArgs e)
        {
            msgLog("Form Load Success");
        }

    }

    class engine
    {
        MainForm _mainForm = new MainForm();

        public bool StartConnection(string txtIPAddress, int p)
        {
            _mainForm.msgLog("StartConnection started");
            //do something
            return true;
        }
    }
}

```