Using Win32 functions in Visual FoxPro Image Gallery
Code examples:
Custom GDI+ class
Splash Screen for the VFP application
Vertical Label control
Displaying dimmed window behind VFP top-level form
Subclassing CommandButton control to create BackColor property
Storing content of the Clipboard to a bitmap file
How to put a vertical text scrolling on the form (a movie cast)
How to make a VFP form fading out when released (GDI version)
How to put a horizontal text scrolling on the form (a news line, marquee)
Printing text with the Escape function
Bitmap Class for Visual FoxPro application
Custom FTP Class for Visual FoxPro application
Storing screen shot of a form to bitmap file
Playing WAV sounds simultaneously
How to play AVI file on the _screen
How to view icons stored in executable files (Icon Viewer) - II
Pocket PC: custom RAPI class for operating with files and folders on mobile device
CryptoAPI: Collection of Providers class
How to print FoxPro form -- II
Obtaining names and positions for shortcuts located on the Windows Desktop
Enumerating Processes -- WinNT
Copying picture of the active form to the Clipboard using Enhanced Metafile API functions
Passing data records between VFP applications via the Clipboard
Enumerating devices installed on the local machine
Capturing keyboard activity of another application with the Raw Input API (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
click to open
Before you begin:
In this code sample, VFP form registers for receiving the raw input from each and any keyboard type device connected to the computer. That includes keyboards, numeric keypads, keyboard wedge scanners and so on.

The testing is simple. Any text typed in another Windows application (like text editor, spreadsheet, browser) will be duplicated in an EditBox on the VFP form.

Note that this code sample requires VFP9 version of the BINDEVENT() function. The one that can handle Windows messages.

See also:
  • LanguageBar ActiveX control
  • Enumerating raw input devices attached to the system
  • Switching between keyboard layouts
  • Disabling mouse and keyboard input for the main VFP window
  • How to disable the Windows Clipboard
  • Monitoring clipboard content changes
      Members area. Log in to view this example.
      User name:
      Forgot your password?
      Sign up for
    the Membership

    User rating: 0/10 (0 votes)
    Rate this code sample:
    • ~
    7162 bytes  
    Created: 2011-01-06 12:31:59  
    Modified: 2016-02-25 09:23:01  
    Visits in 7 days: 216  
    Listed functions:
    Printer friendly API declarations
    My comment:
    By default, no application receives the raw input. To start receiving it, an application must register a device type it expects to get a data from. After registering, the application receives the raw input in the form of WM_INPUT messages.

    User input may come not just from the keyboard and the mouse, but also from joystick, touch screen, microphone, and other devices collectively known as Human Interface Devices (HIDs).

    Similar functionality can be implemented via global keyboard and mouse hooks.

    In case of same type multiple input devices, the Raw Input API has means to separate the input (i.g. keystrokes, mouse events) by their source.
    Word Index links for this example:
    Translate this page:
      Spanish    Portuguese    German    French    Italian offers instant, free translations of text or web pages.
    User Contributed Notes:
    There are no notes on this subject.

    Copyright 2001-2017 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.6.38), the Open Source standard SQL database, AceHTML Freeware Version 4, freeware HTML Editor of choice.   Hosted by Korax Online Inc.
    Last Topics Visited (
    18 sec.Example: 'Adding and deleting User Accounts'
    34 sec.Function: 'waveInReset'
    Function group: 'Windows Multimedia'
    48 sec.Example: 'Retrieving configuration information for the specified workstation (Win2000/XP)'
    1.07 min.Function: 'CeFindFirstDatabaseEx'
    Function group: 'Remote Application Programming (RAPI)'
    1.33 min.Example: 'Obtaining names of local and global groups for current user (WinNT/XP/2K)'
    1.57 min.
    Function group: 'Windows Sockets 2 (Winsock)'
    1.85 min.All Functions
    2.12 min.Function: 'GetEnvironmentVariable'
    Function group: 'Process and Thread'
    2.42 min.
    Function group: 'Pipe'
    2.7 min.Function: 'AVIFileOpen'
    Function group: 'Windows Multimedia'
    Advertise here!