1. you can copy all the Text in a TextBox:
string allTheText = textBox1.Text;
a. if you mean copy the text to the Clipboard in C#: you need to read the MSDN docs on using the Clipboard, and search here on CP for information on using the Clipboard in C#, WinForms. See the examples on MSDN:[
^]. Using the Clipboard is NOT difficult.
2. to copy only the selected Text in a TextBox:
string theSelectedText = textBox1.SelectedText;
a. refer to note 1.a. if you wish to copy to the Clipboard
3. Printing Text:
a. you need to use the System.Drawing.Printing NameSpace[
^]
b. within that NameSpace you need to learn how to use the PrintDocument Class[
^]
c. a good place to start, with links to how-to's for typical print jobs is here: "Windows Forms Print Support"[
^]"
"Printing in Windows Forms consists primarily of using the PrintDocument Component (Windows Forms) component to enable the user to print, and the PrintPreviewDialog Control (Windows Forms) control, PrintDialog Component (Windows Forms) and PageSetupDialog Component (Windows Forms) components to provide a familiar graphical interface to users accustomed to the Windows operating system.
Typically, you create a new instance of the PrintDocument component, set the properties that describe what to print using the PrinterSettings and PageSettings classes, and call the Print method to actually print the document.
During the course of printing from a Windows-based application, the PrintDocument component will show an abort print dialog box to alert users to the fact that printing is occurring and to allow the print job to be canceled."[
^]