Save All text in richTextBox as image
C#
2
Posts
2
Posters
0
Views
1
Watching
-
If you take this [^]article as the basis (ok, it adds extra things as syntax highlighting but those can be removed). All you need to do then is call DrawEditControl with a Graphics object created from an image rather than a PrintDocument. E.g.
private void Print()
{
using (Bitmap image = new Bitmap(width, height, PixelFormat.Format24bppRgb))
{
using (Graphics gfx = Graphics.FromImage(image))
{
DrawEditControl(gfx);
}
image.Save(filename, ImageFormat.Bmp);
}
}
As of how to accomplish this I wouldn't have a clue at the moment and I'm too lazy to google it