Using Win32 functions in Visual FoxPro Image Gallery
Clipboard
..msdn
ChangeClipboardChain
CloseClipboard
CountClipboardFormats
EmptyClipboard
EnumClipboardFormats
GetClipboardData
GetClipboardFormatName
GetClipboardOwner
GetClipboardViewer
GetPriorityClipboardFormat
IsClipboardFormatAvailable
OpenClipboard
RegisterClipboardFormat
SetClipboardData
SetClipboardViewer
Code examples:
How to disable the Windows Clipboard (VFP9)
How to disable the Windows Clipboard (VFP9)

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
Versions:
click to open
Before you begin:

Set the checkbox and the clipboard will be disabled for all running Windows applications.

This FoxPro form is set to be notified when anything is copied to the clipboard -- text, images etc. And it clears the clipboard content on each notification.

Neither timers nor ON KEY handlers are involved.

See also:
  • How to block the PrintScreen key
  • 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:
    • ~
    3412 bytes  
    Created: 2005-05-31 18:26:41  
    Modified: 2011-01-08 08:00:28  
    Visits in 7 days: 158  
    Listed functions:
    CallWindowProc
    ChangeClipboardChain
    GetWindowLong
    SendMessage
    SetClipboardViewer
    Printer friendly API declarations
    My comment:
    The Windows OS has a mechanism that allows to notify a window when the content of the clipboard changes.

    Not just one window can be notified but many. They are organized in a chain. The first window in this chain receives a notification and passes it to the next one, so the notification goes down to the last window registered in this chain.

    Any FoxPro window, the _screen or a form, can be registered as a Clipboard viewer -- this is how it is called. The notifications are actually window messages. And VFP9 handles window messages really good due to extended BINDEVENT() function.

    WM_CHANGECBCHAIN -- this notification is sent after a registered window has been removed from the chain of clipboard viewers.

    WM_DRAWCLIPBOARD -- this notification is sent after the content of the clipboard has changed.
    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.234.126.92)
    3 sec.Example: 'Changing file attributes'
    1.7 hrs.Example: 'MapiSendMail class for Visual FoxPro application'
    2 hrs.Example: 'Creating a clipping region from the path selected into the device context of a form'
     Example: 'How to access a file using not its name but an alias (hard link)'
    3.71 hrs.Example: 'Obtaining the bounding rectangle for the specified device context'
    3.97 hrs.Example: 'How to save registry key including its subkeys and values to a file'
    6.61 hrs.Example: 'Detecting changes in connections to removable drives (VFP9)'
    23.77 hrs.Example: 'Deleting files into the Recycle Bin'
     Function: 'RegEnumKeyEx'
    1 day(s)Function: 'GdipCreateFromHDC2'
    Google
    Advertise here!