Too lazy to talk about a lot of code.
Private void copy toolstripmenuitem_click (Object sender, eventargs E)
{
This. contextmenustrip1.sourcecontrol. Select (); // obtain the focus first to prevent running after two clicks
RichTextBox RTB = (RichTextBox) This. contextmenustrip1.sourcecontrol;
RTB. Copy ();
}
Private void paste toolstripmenuitem_click (Object sender, eventargs E)
{
This. contextmenustrip1.sourcecontrol. Select ();
RichTextBox RTB = (RichTextBox) This. contextmenustrip1.sourcecontrol;
RTB. paste ();
}
Private void cut toolstripmenuitem_click (Object sender, eventargs E)
{
This. contextmenustrip1.sourcecontrol. Select ();
RichTextBox RTB = (RichTextBox) This. contextmenustrip1.sourcecontrol;
RTB. Cut ();
}
Private void Delete toolstripmenuitem_click (Object sender, eventargs E)
{
This. contextmenustrip1.sourcecontrol. Select ();
RichTextBox RTB = (RichTextBox) This. contextmenustrip1.sourcecontrol;
RTB. selectedtext = "";
}
Private void select all toolstripmenuitem_click (Object sender, eventargs E)
{
This. contextmenustrip1.sourcecontrol. Select ();
RichTextBox RTB = (RichTextBox) This. contextmenustrip1.sourcecontrol;
RTB. selectall ();
}
Private void undo toolstripmenuitem_click (Object sender, eventargs E)
{
This. contextmenustrip1.sourcecontrol. Select ();
RichTextBox RTB = (RichTextBox) This. contextmenustrip1.sourcecontrol;
RTB. Undo ();
}