Example #1
0
 private void RichTextBox1_KeyDown(object sender, KeyEventArgs e)
 {
     if (e.KeyCode == Keys.V && e.Modifiers == Keys.Control)
     {
         // Code for Copy Action
         if (!string.IsNullOrEmpty(RichTextBox1.Text))
         {
             RichTextBox1.Font      = new Font("times new roman", 14f, FontStyle.Regular);
             RichTextBox1.ForeColor = Color.Black;
             string firstLine = RichTextBox1.Lines[0];
             RichTextBox1.Select(RichTextBox1.GetFirstCharIndexFromLine(0), firstLine.Length);
             RichTextBox1.SelectionFont = new Font("times new roman", 20f, FontStyle.Bold);
         }
     }
 }