Using Win32 functions in Visual FoxPro Image Gallery
Code examples:
Start an executable from VFP application by using the CreateProcess
Terminating all running applications from a VFP program
Using File Mapping for enumerating files opened by Visual FoxPro
Converting Unicode data from the Clipboard to a character string using a given code page
Displaying dimmed window behind VFP top-level form
How to make the caption of a VFP application flashing in the Windows task bar
Loading a string resource from an executable file
Reading entries from Event logs
Retrieving file information for the VFP executable running
Subclassing CommandButton control to create BackColor property
Using Beep and Sleep functions to make the old tin buzz sing (WinNT only?)
Adding a background image to VFP report (VFP9, ReportListener)
How to enable the SE_SHUTDOWN_NAME privilege for the application
How to play MIDI notes
Splash Screen for the VFP application
Drawing a rectangle using Windows regular edges and borders
GDI+: Storing content of the Clipboard to a bitmap file
Storing screen shot of a form to bitmap file
Adding and deleting Scheduled Tasks using NetScheduleJob API functions
Creating a window using CreateWindowEx function
How to adjust monitor brightness (Vista, monitor with DDC support)
How to make application automatically close all documents it opened
How to read email messages using Simple MAPI
How to display the Print property sheet
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: 98  
    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 (184.73.7.143)
    4 sec.Function: 'WaitForSingleObject'
    Function group: 'Synchronization'
    6 sec.Example: 'How to display advanced Task Dialog (Vista)'
    2.61 hrs.Example: 'How to put a horizontal text scrolling on the form (a news line)'
     Function: 'GetEnhMetaFileHeader'
    2.72 hrs.Example: 'Printf-style formatted text output in VFP'
     Example: 'Reading and setting the priority class values for the current process and thread'
     Example: 'Using Video Capture: enumerating installed capture drivers'
    3.16 hrs.Function: 'AVIStreamInfo'
    Function group: 'Windows Multimedia'
     Function: 'PostMessage'
     Example: 'How to put a horizontal text scrolling on the form (a news line)'
    Google
    Advertise here!