RichTextBox & Embedding Objects in it

  • Thread starter Thread starter Ryan Ross
  • Start date Start date
R

Ryan Ross

Hi Guys,

I've searched up and down the internet looking for some information on
how to embed an given object into an RichTextBox, but most methods
utilize the clipboard or require working over some nasty Win32 code
(importing from C++ to C#, and all the fun that goes with that). Any
ideas, please, before I begin churning through Win32 code?

Thanks,
Ryan
 
Hi Guys,

I've searched up and down the internet looking for some information on
how to embed an given object into an RichTextBox, but most methods
utilize the clipboard or require working over some nasty Win32 code
(importing from C++ to C#, and all the fun that goes with that). Any
ideas, please, before I begin churning through Win32 code?

Not really. All you have in .NET is the API that RichTextBox exposes,
and that's fairly limited. If you want advanced stuff, you'll have to
use Win32 API.

In some cases, depending on what kind of stuff you want to embed, you
might be able to directly generate the RTF for that, and then writing
it into RichTextBox.Rtf. You can experiment with WordPad - paste
objects you want to have into it, save as .rtf, and look at the saved
file. Be warned though that RichTextBox does not support rendering
everything that you may be able to embed.
 
Back
Top