Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. C#
  4. Continuous update of PrintPreviewControl

Continuous update of PrintPreviewControl

Scheduled Pinned Locked Moved C#
questioncsharpgraphicshelpannouncement
3 Posts 2 Posters 1 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • L Offline
    L Offline
    lclarsen
    wrote on last edited by
    #1

    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. 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). My question is, how can I update the PrintPreviewControl on demand? Thank! Regards, Lars

    T 1 Reply Last reply
    0
    • L lclarsen

      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. 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). My question is, how can I update the PrintPreviewControl on demand? Thank! Regards, Lars

      T Offline
      T Offline
      tatchung
      wrote on last edited by
      #2

      Hi frend! 1 begginer saying to another:

      this.TextBox1.TextChanged

      then put ur PrintPreviewControl code inside this:

      TextBox1_TextChanged

      just a though...then again I could be wrong:-O Aim small, miss small...

      L 1 Reply Last reply
      0
      • T tatchung

        Hi frend! 1 begginer saying to another:

        this.TextBox1.TextChanged

        then put ur PrintPreviewControl code inside this:

        TextBox1_TextChanged

        just a though...then again I could be wrong:-O Aim small, miss small...

        L Offline
        L Offline
        lclarsen
        wrote on last edited by
        #3

        tatchung, My problem is not how to handle events, but how to access the PrintPreviewControls graphics context on demand. The graphics context is part of the PrintPageEventArgs which is automatically passed to the PrintPage event handler upon creation of the PrintPreviewControl. Regards, Lars

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups