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
  1. Home
  2. General Programming
  3. C#
  4. Print Preview & Print

Print Preview & Print

Scheduled Pinned Locked Moved C#
helpcsharpc++
3 Posts 3 Posters 0 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.
  • A Offline
    A Offline
    Anh_Tuan
    wrote on last edited by
    #1

    Hello, I have developed an application in C#, I used RichTextBox control for my word processing part. Now I want to add two more functions that are Print Preview and Print but I had not found any built-in method regarding Print issue with RTB. I am thinking about writing code for the event PrintDocument.PrintPage, hmmm. However, it seems not to be a good idea, I know that I would not have to do that if I deal with the problem using MFC. Though... Buddies suggest me what to do pls. Thanks a lot. J. Alpha

    D H 2 Replies Last reply
    0
    • A Anh_Tuan

      Hello, I have developed an application in C#, I used RichTextBox control for my word processing part. Now I want to add two more functions that are Print Preview and Print but I had not found any built-in method regarding Print issue with RTB. I am thinking about writing code for the event PrintDocument.PrintPage, hmmm. However, it seems not to be a good idea, I know that I would not have to do that if I deal with the problem using MFC. Though... Buddies suggest me what to do pls. Thanks a lot. J. Alpha

      D Offline
      D Offline
      DougW48
      wrote on last edited by
      #2

      If you're talking about using MFC, then I assume you have some version of the visual studios. There are a couple of methods you can use for printing. The first is by using the PrintDocument, PrintDialog, PrintPreviewDialog, and PrintPreviewControls. If you're used to MFC, then you'll think these controls are wonderful...I thought they were much easier to use than the printing functions that MFC provides. The second method is by using the Crystal Reports. If you've never used it before, it'll probably take you a couple of hours to get the hang of it, but once you do, you'll be able to set up your print/print preview in a matter of minutes from now on. I recommend the second. Good luck!

      1 Reply Last reply
      0
      • A Anh_Tuan

        Hello, I have developed an application in C#, I used RichTextBox control for my word processing part. Now I want to add two more functions that are Print Preview and Print but I had not found any built-in method regarding Print issue with RTB. I am thinking about writing code for the event PrintDocument.PrintPage, hmmm. However, it seems not to be a good idea, I know that I would not have to do that if I deal with the problem using MFC. Though... Buddies suggest me what to do pls. Thanks a lot. J. Alpha

        H Offline
        H Offline
        Heath Stewart
        wrote on last edited by
        #3

        If you're looking to print the RTF correctly (WYSIWYG), see HOW TO: Print the Content of a RichTextBox Control By Using Visual C# .NET[^] in the Microsoft Knowledge Base.

        Microsoft MVP, Visual C# My Articles

        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