CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Join Date
    Mar 2001
    Posts
    10

    Print MSFlexGrid in WYSISYG

    I would like to be able to print a filled formatted flexgrid just like it appears on screen.

    Does anyone have any code that would do this??


  2. #2
    Join Date
    May 2000
    Location
    New York, NY, USA
    Posts
    2,878

    Re: Print MSFlexGrid in WYSISYG

    Print MSFlexGrid
    ================
    Here's a quick way to print a MSFlexGrid control's contents:
    Printer.PaintPicture MSFlexGrid_Name.Picture, 0, 0
    Printer.EndDoc

    And if you want it to be the full length of the printer page add this before those two statements:
    Dim old_width as Integer
    MSFlexGrid_Name.width=printer.width

    and this at the end:
    MSFlexGrid_Name.width=old_width



    Iouri Boutchkine
    [email protected]
    Iouri Boutchkine
    [email protected]

  3. #3
    Join Date
    Mar 1999
    Location
    Nepal
    Posts
    540

    Re: Print MSFlexGrid in WYSISYG

    A method that applies to all controls is the PrintForm method.

    You can print the form, and all its contents, as they appear on the screen using

    Form_name.PrintForm

    if you need to print the MSFlexgrid only, then you can redraw it on a new form with no border and then use PrintForm.


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