string selectedText = String.Empty; using (var selectForm = new frmSelectText(txtBox.Text)) // Open the form with the textbox text { if (selectForm.ShowDialog(this) == DialogResult.OK) // If user selects text and clicks OK { selectedText = selectForm.SelectedText; // Get the selected text } }This example creates a new instance of frmSelectText with the existing text from a textbox and opens it. If the user selects text and clicks the OK button, the selected text is stored in a variable for use in the parent form. The package library for frmSelectText is likely part of the .NET Framework or a third-party UI library like Telerik or DevExpress.