Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Print Screen in VFP app
Message
 
To
11/11/2004 10:22:11
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00960436
Message ID:
00960690
Views:
13
Hi Tim,

There are at least three API approaches to screen/form printing:
1) GDI API
2) Metafile API
3) GDI+ API

Metafile way is the shortest one.

GDI+ requires support class library. You may use either GDI+ foundation class (then you most likely limit yourself with just VFP9 because of BINTOC and other changes). There are several alternative GDI+ libraries though.

I have several code samples on my web site covering all three approaches (requires membership):

How to print FoxPro form -- this is GDI API
http://www.news2news.com/vfp/?example=158

How to print FoxPro form -- II -- this is Metafile API
http://www.news2news.com/vfp/?example=406

GDI+: sending image of FoxPro form to printer -- GDI+
http://www.news2news.com/vfp/?example=455

Storing screen shot of a form to bitmap file -- GDI
http://www.news2news.com/vfp/?example=187

GDI+: saving image of FoxPro form to graphics file (BMP, GIF, JPG, PNG, TIF) -- GDI+
http://www.news2news.com/vfp/?example=454

When the title of example says "form" -- that means any valid window, including FoxPro main screen and Windows Desktop. Which handle you pass to a printing procedure, that window will be printed.

To get window's handle use HWnd property for Form and _Screen in VFP versions 7..9 . In VFP versions 3..6 use API functions GetActiveWindow, GetFocus, FindWindow, GetDesktopWindow instead.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform