.net - How better do a text clipboard on winform? -
I am creating Notepad (MDI application) on Windows Form Application (C #), and I want to create a normal text clipboard I need to use a variable buffer text of the type string, mainly on all copies of the document.
public string BufferText = "";
The main form (name form 1)
as the form (name blank) for the purpose of public form 1a = new form 1 () ;
and work with it.
public zero cut () {a.BufferText = richTextBox1. Selected text; RichTextBox1.SelectedText = ""; } Public Zero Copy () {a.BufferText = richTextBox1.SelectedText; } Public Zero Paste () {richTextBox1.SelectedText = a.BufferText; }
But this allows me to work with the clipboard only How is an object of empty form empty of the possibility of exchange between multiple objects?
Instead of using built-in clipboard support:
richTextBox1 .Copy (); RichTextBox1.Cut (); RichTextBox1.Paste ();
Comments
Post a Comment