ATTENTION: You are viewing a page formatted for mobile devices; to view the full web page, click HERE.

DonationCoder.com Software > N.A.N.Y. 2012

NANY 2012 Request

(1/5) > >>

kyrathaba:
Not really an app request, but rather a component request, and perhaps there's a free version of this out there in cyberspace somewhere, but if so I haven't come across it:

I would like a custom control that I can add to my Visual C# Express toolbox. It should inherit from RichTextBox, but should be able to LoadFile() just like a RichTextBox (plain or RTB format), and should have a Print() method that prints the entire contents of the custom Rich TextBox.

Printing is abominably arcane in .NET!  Grrr...

lotusrootstarch:
does this help?

http://msdn.microsoft.com/en-us/library/aa970917.aspx

kyrathaba:
Thanks, lotus.  There are lots of useful articles such as that one. But all are quite involved. I just can't believe that someone hasn't made a simple drop-in custom control such that, if the Rich Text Box contains text, you can just invoke Print() to print all the text it contains.

I've figured out a way to print simple text files in their entirety, but I'm not finding a pre-made free control for doing the same with RichTextBox. There's plenty of code samples for rolling-your-own.

hollowlife1987:
How about an Extension Method?

http://msdn.microsoft.com/en-us/library/bb383977.aspx

kyrathaba:
Hmm, thank you for that link, hollowlife; it appears worthy of study...

Navigation

[0] Message Index

[#] Next page

Go to full version