Results 1 to 5 of 5

Thread: RTF Print Preview

  1. #1

    Thread Starter
    Hyperactive Member doctrin13th's Avatar
    Join Date
    Sep 2008
    Posts
    303

    Question RTF Print Preview

    Rich Text Format print preview code anyone???

  2. #2
    PowerPoster dilettante's Avatar
    Join Date
    Feb 2006
    Posts
    24,487

    Re: RTF Print Preview

    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.

  3. #3
    PowerPoster
    Join Date
    Jun 2013
    Posts
    7,454

    Re: RTF Print Preview

    Quote Originally Posted by doctrin13th View Post
    Rich Text Format print preview code anyone???
    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

  4. #4
    PowerPoster dilettante's Avatar
    Join Date
    Feb 2006
    Posts
    24,487

    Re: RTF Print Preview

    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.

  5. #5

    Thread Starter
    Hyperactive Member doctrin13th's Avatar
    Join Date
    Sep 2008
    Posts
    303

    Re: RTF Print Preview

    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?

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
  •  



Click Here to Expand Forum to Full Width