private void button2_Click(object sender, EventArgs e) { try { VisualDocumentEditor vde = new VisualDocumentEditor(_Path, true); vde.ShowDialog(); doc_panel.Controls.Clear(); using (System.IO.StreamReader sr = new System.IO.StreamReader(_Path)) { richTextBox1.Text = sr.ReadToEnd(); sr.Close(); } Run(); } catch (Exception) { Message msg = new Message("Ninponix Office 2017", "Could not start the thread. Please try again", MessageIcon.MessageIconType.Error, MessageIcon.MessageMode.NVL); msg.ShowDialog(); } }