Using Win32 functions in Visual FoxPro Image Gallery
Window Class
..msdn
GetClassInfo
GetClassInfoEx
GetClassLong
GetClassName
GetWindowLong
RegisterClassEx
SetWindowLong
UnregisterClass
Code examples:
Adding user-defined items to the Control Menu of VFP form (requires VFP9)
Browsing Windows Known Folders (Special Folders)
Capturing keyboard activity of another application with the Raw Input API (VFP9)
Creating irregularly shaped FoxPro form using transparency color key
Customizing the frame of top-level form: removing the standard frame (VFP9, Vista)
Detecting changes in connections to removable drives (VFP9)
Displaying dimmed window behind VFP top-level form
Displaying hypertext links with the SysLink control (VFP9, Comctl32.dll)
Displaying icons in the system tray (VFP9)
Displaying the associated icons and descriptions for files and folders
Dragging files from Explorer window and dropping them on FoxPro control (requires VFP9)
Extended MessageBox Class
How to block the PrintScreen key
How to disable the Windows Clipboard (VFP9)
How to hot-track menu item selection in top-level form (requires VFP9)
How to make a VFP form fading out when released (GDI version)
How to make a VFP form fading out when released (GDI+ version)
How to view icons stored in executable files (Icon Viewer) - II
Locking the workstation
Placing a button on the VFP form as a new child window
Retrieving information about the main VFP window
Semi-transparent Form
Setting properties of the window: caption and user-defined value
Switching between keyboard layouts
System Image List Viewer
Transparent Menu Class (requires VFP9)
Using Common Controls: the Header Control
Using FoxTray ActiveX control: System Tray Icon and menu attached to VFP form
Using Month Calendar Control (VFP9, Comctl32.dll)
Using WM_COPYDATA for interprocess communication (VFP9)
Windows Shell Icons displayed and exported to ICO files (Vista)
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
Versions:
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
  •  
      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:
    • ~
    7162 bytes  
    Created: 2011-01-06 12:31:59  
    Modified: 2011-02-22 03:05:19  
    Visits in 7 days: 313  
    Listed functions:
    CallWindowProc
    GetKeyboardState
    GetLastError
    GetRawInputData
    GetWindowLong
    MapVirtualKey
    RegisterRawInputDevices
    ToAscii
    Printer friendly API declarations
    My comment:
    By default, no application receives raw input. For doing that, an application must register a device type it wants to get data from. When registered, an application receives the raw input through the WM_INPUT messages.

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

    Global keyboard and mouse hooks can produce similar results.

    In case of multiple input devices of same type, the Raw Input API has means to separate the input (i.g. keystrokes, mouse events) by source.

    * * *
    Curiously: initially I chose registering keystrokes on KeyUps. And switched to KeyDowns after finding that fast typed keystrokes sometimes get released not in the sequence of pressing.
    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.242.188.217)
    4.33 hrs.Example: 'Using shared memory to exchange data between two FoxPro applications'
    4.34 hrs.Function: 'GetGraphicsMode'
    6.91 hrs.Example: 'GDI+: reading and writing metadata in JPEG and TIFF files'
    11.54 hrs.Example: 'Closing Windows'
     Example: 'Enumerating connections made to a shared resource for the local computer (WinNT only)'
    12.24 hrs.Function: 'SQLRowCount'
    Function group: 'ODBC API'
     Function: 'GetShellWindow'
    Function group: 'Window'
    Google
    Advertise here!