Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Printing a form as displayed on-screen

Status
Not open for further replies.

stanmurphy

Technical User
Oct 14, 2000
89
Hi there,

Since the Keyword search is down I can't check if this has been answered before.

Is there a way to print a form as it is displayed onscreen. I have written a scheduling program and the users want to be able to print the schedule as it appears onscreen in case of a power failure or whatever.

The form consists of about 20 labels and about 50 text boxes. I suppose I could send all the field names to a report, but I'm hoping there is an easy way to just print the screen from VFP7.

Thank you :)
 
stanmurphy

You can programatically do a screen capture of your form, save it to a bitmap and print the bitmap.

It's also a quick and dirty way of producing complex single page reports without the hassle of creating them in the VFP report writer.

The maximum height of a report is going to be a little less than 600 pixels as you can only capture a visible area of screen.
FAQ184-2483 - the answer to getting answered.​
Chris [pc2]
 
Go to the UT at click the Downloads picture on the Left, choose Visual FoxPro, then enter "print screen" (without the quotes) in the Title box and press enter. You should get back a link to:
Print Screens from VFP November 15, 2000 22:56
Print screens and forms directly from VFP using custom classes and DibApi32.dll.

An alternate solution is also available at VFUG (Mike Timpe of our local user group provided a Delphi based solution that works in VFP for the 2/2002 newsletter. The .ZIP is available in the downloads area.

Rick
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top