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

Thread: FlexGrids

  1. #1
    Join Date
    Apr 2001
    Location
    Lincs, UK
    Posts
    16

    FlexGrids

    Can I print the data of a flexgrid to the printer. If so what code will do it. I have tried Printer.Print Flexgrid This only prints the first cell ????


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

    Re: FlexGrids

    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
    May 2001
    Posts
    3

    Re: FlexGrids

    Printing MSFlexgrid
    ===================

    You have the same problem with me. There is one solution, print the MSFlexigrid as bitmap. But, the printing quality is not good. The other method is to draw line and put text on the printer object - Printer.line (argument list), and Printer.Print (Text to print). It is OK if we test to one printer. But there must be a problem of printer compatibality. Different printer has different scaling. I have tried this method, it was worked on laser but not the other printer. I still do not know how to get the correct scaling to make my printing function is working on all types of printers (drivers). In the market, ComponentOne offers VSPrint 7. I have not tried it, is it OK or not..

    By the way, if you have found the solution, please share the information with me. At the same time I am still invetigating the problem.

    Thank you.


    Rahim Rasimin
    Design Engineer
    Sapura Thomson Radiocommunications Sdn Bhd
    Tel: 603-42503513
    [email protected]



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