-
Dec 6th, 2022, 06:17 AM
#1
Thread Starter
Addicted Member
How to print a RTF?
Hi all,
Consider you have a RichTextBox1 control filled with lots of texts.
There are 3 controls which I am sure I have to use them:
1) PrintDocument1 which is a hidden control and this is the thing you finally print. But I have no idea how can I import my RTF texts in it.
2) PrintPreviewControl1 which is visible and gets that "PrintDocument1" as input document to preview. Very handy control.
3) At last PrintDialog1 which provides available printers and their advanced settings like before, then finally lead to printing [possibly] that "PrintDocument1".
How can I make this sequence possible?
-
Dec 6th, 2022, 07:05 AM
#2
Re: How to print a RTF?
For the record, a PrintDocument is not a control. It is a component. All controls inherit the Control class, which PrintDocument does not. Control inherits Component and being a component is all that's required to be added to the Toolbox.
-
Dec 6th, 2022, 07:10 AM
#3
Re: How to print a RTF?
Check this out:
https://stackoverflow.com/questions/...ng-richtextbox
That is in C# but you can use Instant VB from Tangible Software Solutions to convert it. There's also this in VB:
https://social.msdn.microsoft.com/Fo...orum=vbgeneral
If you want to look further, the keywords are "wysiwyg richtextbox" and make sure you keep it to WinForms.
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|