Using Win32 functions in Visual FoxPro Image Gallery
Code examples:
How to change display settings: screen resolution, screen refresh rate
Enumerating data formats currently available on the clipboard
Custom GDI+ class
Mapping and disconnecting network drives
Winsock: sending email messages (SMTP, port 25)
Capturing keyboard activity of another application with the Raw Input API (VFP9)
Winsock: retrieving directory listing from an FTP server using passive data connection (FTP, port 21)
Converting Unicode data from the Clipboard to a character string using a given code page
Enumerating raw input devices attached to the system (keyboard, mouse, human interface device)
Disk in drive A:
How to display the Properties dialog box for a file (ShellExecuteEx)
Enumerating network resources
Detecting changes in connections to removable drives (VFP9)
Using EnumPrinters function to enumerate locally installed printers
How to download a file from the FTP server using FtpGetFile
Using Font and Text functions
Splash Screen for the VFP application
Using Video Capture: displaying on FoxPro form frames and previewing video obtained from a digital camera
How to play AVI file on the _screen
Retrieving the name of the network resource associated with a local device
Vertical Label control
Subclassing CommandButton control to create BackColor property
Running MSDOS Shell as a child process with redirected input and output (smarter RUN command)
Creating a console window for Visual FoxPro application
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: 148  
    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.235.20.17)
    3 sec.Example: 'The SQLGetProp() creates a bridge between Visual FoxPro and the ODBC API'
    2.48 hrs.Example: 'Printing Image File, programmatically set print page orientation to landscape'
     Example: 'How to change the name and the size of the font in the MessageBox dialog'
    5.43 hrs.Function: 'URLDownloadToFile'
     Example: 'GDI+: Creating thumbnails to preview images in a directory'
     Example: 'Using the Semaphore object to allow only one instance of VFP application running'
    8.14 hrs.Example: 'GDI+: sending image of FoxPro form to printer'
    11.03 hrs.Example: 'Custom GDI+ class'
     Example: 'How to block the ALT+TAB shortcut (WinXP)'
    13.03 hrs.Function: 'InternetGetConnectedStateEx'
    Google
    Advertise here!