CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Oct 2003
    Location
    Denmark
    Posts
    11

    How do I refresh PrintPreviewControl on demand?

    Hi,

    I'm quite new to C# and I have been fiddling around with a little problem for some time now.
    I have a form with a PrintPreviewControl on it. I also have a RichTextBox on the same form. Now, I want to update the PrintPreviewControl contents whenever I type something in the RichTextBox. This is no problem, I just trigger on key down. Here comes the problem: As far as I can see, the PrintPreview is only updated when it is created (it seems the creation of the PrintPreviewControl fires the PrintPage event with the previewers graphics context in the PrintPageEventArgs). My question is, how can I update the PrintPreviewControl on demand from e.g. from the OnKeyDown event handler?

    Thanks!

    Regards,
    LC

  2. #2
    Join Date
    Aug 2001
    Posts
    77

    Re: How do I refresh PrintPreviewControl on demand?

    Call the InvalidatePreview method.

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

Featured