.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

Popular posts from this blog

import - Python ImportError: No module named wmi -

Editing Python Class in Shell and SQLAlchemy -

c# - MySQL Parameterized Select Query joining tables issue -