I’m trying to include the font “KaiTi” while setting text on the clipboard, so that wherever I paste the data, the “KaiTi” Font will be the font that the text is in, inevitably keeping all of the data that I am pasting to the clipboard formatted the way that I want it too.
This is what I tried, I know it’s off, but I don’t know what to do..
TextBox texter = new TextBox();
texter.Text = strToClips;
texter.Font = new Font("KaiTi", 10);
Clipboard.SetText(texter.Text);
Use a RichTextBox. It puts rich text on the clipboard that includes formatting. Use its Copy() method. Pasting back now also works automatically without any code.