Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Protecting Grid from Screenshot
Message
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
01112302
Message ID:
01112352
Views:
13
You may protect this to a certain extent but not completely.

The PrintScreen key places the image of the screen to the Clipboard. In VFP9 it is possible to disable the Clipboard by erasing it automatically whenever it becomes populated with data. API functions ChangeClipboardChain, SetClipboardViewer and others are to be used for this purpose. Also window messages WM_CHANGECBCHAIN and WM_DRAWCLIPBOARD are involved.

VFP code sample (membership required):
How to disable the Windows Clipboard (requires VFP9)
http://www.news2news.com/vfp/?example=488

But a determined person may decide to enumerate all visible windows. It takes just a fraction of second to obtain the HWND for a VFP form knowing its caption. Then you get HDC for this HWND. Then you call the BitBlt API function to copy the form's image to a virtual HDC and so on.

Take a look at a picture on this page. This is an example of such window enumeration.
Simple Window Viewer
http://www.news2news.com/vfp/?example=57

If anything can be done, it should probably be done on GDI level. Or don't use GDI at all :) which means don't use grids and other VFP controls do display sensitive info.
Previous
Reply
Map
View

Click here to load this message in the networking platform