OpenFileDialog openFile1 = new OpenFileDialog(); // Initialize the OpenFileDialog to look for text openFFilter = "Text Files|*xt"; // Check if the user selected a file from the OpenFileD if (openFShowDialog() == SWFDialogROK) { Form f = new Form(); MdiParent = this; RichTextBox rich = new RichTextBox(); Dock = DockSFill; CAdd(rich); Show(); Width = Width; Height = Height; Form activeChild = ActiveMdiChild;RichTextBox theBox = (RichTextBox)activeCActiveControl;theBLoadFile(openFFileName, RichTextBoxStreamTPlainText);FileInfo g = new FileInfo(openFFileName); Text = NSubstring(NLastIndexOf("\\") + 1)Replace("xt", " "); }