// Create a new TextBox control TextBox textBox1 = new TextBox(); // Set focus to the TextBox textBox1.Focus(); // Paste text from the Clipboard into the TextBox textBox1.Paste();
// Create a new TextBox control TextBox textBox1 = new TextBox(); // Get text from another TextBox control string textToPaste = textBox2.Text; // Paste the text into the TextBox textBox1.Paste(textToPaste);This example gets text from another TextBox control and pastes it into the first TextBox control. The System.Windows.Forms namespace is part of the .NET Framework Class Library.