CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2

Hybrid View

  1. #1
    Join Date
    Nov 2010
    Posts
    13

    Question print a Listview

    Hello, I have a listview on a form, and I would like to print its content without saving it to file.
    How can I embed it into a printpreviewcontrol before printing ?

    Thank you

  2. #2
    Join Date
    Dec 2009
    Posts
    596

    Re: print a Listview

    In Vb what I do is use the same sql and reader code that populates the listview and use it to send data to Graphics.Drawstring instead. I would hope that approach is applicable to C#. Haven't tried that yet. My C# hasn't caught up to my VB but I'm hoping this approach will be the same. So take a look into adding a PrintDocument and a PrintPreviewDialog into the form and investigage on how to use the tandem.

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