Click here to Skip to main content
15,393,622 members
Please Sign up or sign in to vote.
4.00/5 (1 vote)
I have run into a problem. On my form I have a richtextbox with text. My question is: Is there a way to horizontally and/or vertically mirror my text? or at least mirror my entire control? I have read that one possible solution would be to capture the image of the RichTextBox and follow the way about mirroring the image. However I believe this method would be very, very slow. Is this my only solution?

Thank you.
Mike Hankey 9-Jun-12 9:35am
"horizontally and/or vertically mirror my text" What does this mean?
If you are wanting to keep a duplicate copy of the text use the OnTextChanged event and/or the .Text property.

1 solution

That is a nice question. Here is a post, which mirrors a text using OnPaint event of a form. You may use OnPaint event of your RichTextBox to do the same thing for your control:[^]

I hope it helps,
vlad781 10-Jun-12 19:33pm
I have successfully been able to draw my control to a bitmap, but I am having a problem here because my rich text box has an automatic scrolling feature. And... Well, drawing to bitmap, or OnPaint, will force me to draw out the control EVERY time a pixel is scrolled. A this will slow the application and b that is just terrible. I am still looking for a way to do this as raichtextbox.rightoleft only mirrors the control itself and not the text.

I still give you a 4. Its just not exactly the best way to do what I am trying to do.
Reza Ahmadi 10-Jun-12 23:51pm
Well, thanks. I will inform you if I find a better way
Jαved 11-Jun-12 9:52am
Good answer +5!
Reza Ahmadi 11-Jun-12 11:33am
Thanks Javed! I am happy you find it useful.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900