Using Win32 functions in Visual FoxPro Image Gallery
Code examples:
Enumerating devices installed on the local machine
Locking mouse and keyboard input for the VFP application
Reading and setting Environment variables
Retrieving configuration information for the specified server (Win2000/XP)
Adding and deleting User Accounts
Round FoxPro form
Using the FindMediaType function
A procedure for setting file times
Displaying the main Dial-Up Networking dialog box
Obtaining provider name for a specific type of network
Class library providing access to the System Registry
GDI+: Creating thumbnails to preview images in a directory
Changing pitch and speed of a wave file
How to assemble an array of strings and pass it to external function
Retrieving information about the main VFP window
Accessing Adobe Reader 7.0 main menu from VFP application
Converting an HTTP time/date string to a SYSTEMTIME structure
Getting a bit more than the _CLIPTEXT offers
How to ping a remote site using IP Helper API calls
System and Local Time values
Using GetFileSize
Using the ChooseColor function
Adding a background image to VFP report (VFP9, ReportListener)
Creating a unique filename based on existing filename
How to block the PrintScreen key

User rating: 0/10 (0 votes)
Rate this code sample:
  • ~
More code examples    Listed functions    Add comment     W32 Constants      Translate this page Printer friendly version of this code sample
Before you begin:
The PrintScreen key sends to the Clipboard either whole screen or just the active window (if pressed together with ALT key). To prevent windows of your application to be captured and printed by users through pressing this key, use RegisterHotKey API function.

Still this solution does not provide absolute protection, if there is such a thing :). A determined user may use third-party screen capturing utility that is not associated with the PrintScreen key and the Clipboard.

See also:
  • How to block the ALT+TAB shortcut
  • How to disable the Windows Clipboard (requires VFP9)
  • Preventing users from accessing the Windows Desktop and from switching to other applications
  • Capturing keyboard activity of another application using the Raw Input API

  •  
      Members area. Log in to view this example.
     
      User name:
      Password:
     
     
      Forgot your password?
     
      Sign up for
    the Membership
     
     


    User rating: 0/10 (0 votes)
    Rate this code sample:
    • ~
    3106 bytes  
    Created: 2005-07-25 12:15:33  
    Modified: 2011-12-10 09:20:22  
    Visits in 7 days: 145  
    Listed functions:
    CallWindowProc
    GetFocus
    GetLastError
    GetWindowLong
    RegisterHotKey
    UnregisterHotKey
    WindowProc
    Printer friendly API declarations
    My comment:
    Under VFP8 the code works in a bit limited way. It does disable the PrintScreen key, but the OnPrintScreen method of the form can not be binded to the WM_HOTKEY notification.

    * * *
    Read article Disabling Print Screen, Calling Derived Destructors, and More by Paul DiLascia published in Nov.2005 MSDN Magazine.

    #DEFINE IDHOT_SNAPDESKTOP -2
    #DEFINE IDHOT_SNAPWINDOW -1
    Word Index links for this example:
    Translate this page:
      Spanish    Portuguese    German    French    Italian  
    FreeTranslation.com offers instant, free translations of text or web pages.
    User Contributed Notes:
    There are no notes on this subject.


    Copyright © 2001-2013 News2News, Inc. Before reproducing or distributing any data from this site please ask for an approval from its owner. Unless otherwise specified, this page is for your personal and non-commercial use. The information on this page is presented AS IS, meaning that you may use it at your own risk. Microsoft Visual FoxPro and Windows are trade marks of Microsoft Corp. All other trademarks are the property of their respective owners. 

    Privacy policy
    Credits: PHP (4.4.9), an HTML-embedded scripting language, MySQL (5.1.55-log), the Open Source standard SQL database, AceHTML Freeware Version 4, freeware HTML Editor of choice.   Hosted by Korax Online Inc.
    Last Topics Visited (54.224.79.93)
    1.72 hrs.Example: 'Reading the structure of VFP main menu'
    1.73 hrs.Function: 'SHRegEnumUSKey'
    7.23 hrs.Function: 'InternetCloseHandle'
    Function group: 'Internet Functions (WinInet)'
    10.8 hrs.Function: 'waveOutGetVolume'
    16.74 hrs.Function: 'AVIStreamGetFrameClose'
    17.69 hrs.Function: 'SQLConnect'
     Example: 'Retrieveing information about the active window (even if it is not owned by the calling process)'
    18.27 hrs.Example: 'Storing screen shot of a form to enhanced metafile (*.emf)'
     Example: 'How to display the port-configuration dialog box for a port on the specified server'
    23.15 hrs.Function: 'GetCurrentThreadId'
    Function group: 'Process and Thread'
    Google
    Advertise here!