Rich Text Format print preview code anyone???
Printable View
Rich Text Format print preview code anyone???
It might be possible to use EM_FORMATRANGE with EM_DISPLAYBAND and put a RichTextBox into a "print preview" mode. Or you might have to create and site a naked Win32 RichEdit control to make it work. Or maybe those messages must be used to render into PictureBoxes or something that you "scroll" within another container?
I don't know whether it is practical or not, and I haven't seen any working sample code for doing this in VB6. But I suspect it is the place to start.
There's tons of example-code out there for that (when you google for [VB6 RTF EM_FORMATRANGE] )
Here's one of them (first link in the google-results ... haven't tested, if it's any good though...)
https://support.microsoft.com/en-us/kb/146022
Olaf
I saw that one myself but I assumed the OP really was after something more like Word's Print Layout. That shows "pages" with drop shadows against a background with the page borders visible around the printed text, a gap between pages at page breaks, etc.
Or maybe using word application and its print preview BUT I would like to disable my program and give exclusive focus to the word app while in the print preview then close the word app if print preview is closed or printed already?