Click to See Complete Forum and Search --> : Print MSFlexGrid in WYSISYG


bigfredb
March 19th, 2001, 09:47 AM
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??

Iouri
March 19th, 2001, 10:39 AM
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
iouri@hotsheet.com

shree
March 19th, 2001, 08:36 PM
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.