Using Win32 functions in Visual FoxPro Image Gallery
Code examples:
High-powered ALLTRIM
How to find the application associated with a file name
Retrieving local computer and user names
Using the IsWindowEnabled function
Exporting DLL icon resources as .ICO files
How to delete all print jobs for a printer
Obtaining Shell32.dll version
Retrieveing general information about the driver and data source associated with an ODBC connection
Testing if a connection to an Url can be established
Testing MS Internet Explorer version installed
Using NetWkstaTransportEnum to obtain MAC Address of remote server
How to block the ALT+TAB shortcut (WinXP)
How to display Windows On-Screen Keyboard
Reading the structure of VFP main menu
Semi-transparent Form
GDI+: saving image of FoxPro form to graphics file (BMP, GIF, JPG, PNG, TIF)
How to retrieve adapter information for the local computer (including MAC address)
Retrieving the interface–to–IP address mapping table
Enumerating global and local group accounts on a server (WinNT/XP/2K)
Enumerating ports that are available for printing on a specified server
How to create a desktop shortcut (shell link)
How to view icons stored in executable files (Icon Viewer)
Monitoring changes occurring within a directory
Obtaining some properties for the Windows desktop using the GetWindowPlacement function
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: 147  
    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 (50.16.17.90)
    1.27 hrs.Examples
    Page 12
     Example: 'Downloading files from the FTP server using InternetReadFile'
    1.73 hrs.Function: 'GdipCreateFromHDC'
     Example: 'Sending email messages with Simple MAPI'
    2.7 hrs.Function: 'SHRegOpenUSKey'
    Function group: 'Registry'
    6.46 hrs.Example: 'Winsock: retrieving the host information corresponding to a network address'
     
    Function group: 'Atom'
    8.54 hrs.Function: 'RegCreateKeyEx'
    Function group: 'Registry'
    9 hrs.Function: 'CopyMemory'
     Function: 'EnumPrinters'
    Google
    Advertise here!