Home
Search
 
What's New
Index
Books
Links
Q & A
Newsletter
Banners
 
Feedback
Tip Jar
 
C# Helper...
 
XML RSS Feed
Follow VBHelper on Twitter
 
 
 
MSDN Visual Basic Community
 
 
 
 
 
 
TitleMake a RichTextBox print WYSIWYG text
DescriptionThis example shows how to make a RichTextBox print WYSIWYG text in Visual Basic 6. It sends the EM_SETTARGETDEVICE message to the control to make it uses the default printer's settings.
KeywordsRTF, rich text, rich text box, RichTextBox, WYSIWYG, print, printing
CategoriesControls, Graphics
 
The program sends the RichTextBox control the EM_SETTARGETDEVICE message to tell it to base its display on the default printer. It sends the control the EM_FORMATRANGE message to make it send pages of data to the printer with one inch margins.

See the code for details. This program uses the code in Microsoft Knowledge Base article Q146022, HOWTO: Set Up the RichTextBox Control for WYSIWYG Printing.

 
 
Copyright © 1997-2010 Rocky Mountain Computer Consulting, Inc.   All rights reserved.
  Updated