از تکه کدهای زیر می تونید استفاده کنید چیزه خاصی نداره خیلی ساده است
کد:
private void cutToolStripMenuItem_Click(object sender, EventArgs e)
{
//performs Cut operation in richTextBox
richTextBox1.Cut();
}
private void pasteToolStripMenuItem_Click(object sender, EventArgs e)
{
//perform paste operation in richtextbox
richTextBox1.Paste();
}
private void copyToolStripMenuItem_Click(object sender, EventArgs e)
{
//perform copy operation
richTextBox1.Copy();
}
private void selectAllToolStripMenuItem_Click(object sender, EventArgs e)
{
//selecting all content or text in richtextbox
richTextBox1.SelectAll();
}
private void undoToolStripMenuItem_Click(object sender, EventArgs e)
{ //performs undo operation and checking user can undo or not
if (richTextBox1.CanUndo)
{
richTextBox1.Undo();
}
}
private void redoToolStripMenuItem_Click(object sender, EventArgs e)
{
//Redo
statusStrip1.Text = "used to redo last changed text";
if (richTextBox1.CanRedo)
{
richTextBox1.Redo();
}
}
private void timeDateToolStripMenuItem_Click(object sender, EventArgs e)
{
//putting or inserting current date time in richtextbox
richTextBox1.Text += Convert.ToString(DateTime.Now);
}