Check FoxPro examples (members area):
Copying picture of the active form to the Clipboard using Bitmap API functionshttp://www.news2news.com/vfp/?example=91&function=42Copying picture of the active form to the Clipboard using Enhanced Metafile API functionshttp://www.news2news.com/vfp/?example=404Storing content of the Clipboard to a bitmap filehttp://www.news2news.com/vfp/?example=189&function=42How to print a FoxPro formhttp://www.news2news.com/vfp/?example=158This is how to copy a form to the clipboard step by step:
- obtain form's window handle and device context
- create compatible device context
- create compatible bitmap using form's width and height
- select compatible bitmap into compatible device context
- use BitBlt to copy image from form's device context to compatible device context
- open Clipboard
- empty Clipboard
- set Clipboard content using the handle to compatible bitmap
- close Clipboard
- release objects: compatible bitmap, compatible device conmtext, form's device context
API functions:
BitBlt
CloseClipboard
CreateCompatibleBitmap
CreateCompatibleDC
DeleteDC
DeleteObject
EmptyClipboard
GetFocus
GetWindowDC
GetWindowRect
OpenClipboard
ReleaseDC
SelectObject
SetClipboardData