Change Font Type in Clipboard with C#
Convert text in the Clipboard to another font and re-save it to the clipboard in C#.
RichTextBox rtb = new RichTextBox(); //The new font is GenericMonospace Font font = new Font(FontFamily.GenericMonospace, 10); //Get text from the clipboard rtb.Text = Clipboard.GetText(); //Select all text in the RichTextBox and apply fontstyle rtb.SelectAll(); rtb.SelectionFont = font; //Copy updated text back to the clipboard rtb.Copy();
Leave a Reply