Using Win32 functions in Visual FoxPro Image Gallery
Code examples:
Setting the mouse capture to the specified window
Copying files as a transacted operation (Vista)
Enumerating print jobs and retrieving information for default printer (JOB_INFO_1 structures)
Generating sequential UUID values
Storing screen shot of a form to bitmap file
Terminating all running applications from a VFP program
How to retrieve adapter information for the local computer (including MAC address)
Running MSDOS Shell as a child process with redirected input and output (smarter RUN command)
Creating a unique filename based on existing filename
How to display the Properties dialog box for a file (ShellExecuteEx)
Playing WAV sounds simultaneously
How to detect if additional monitor is connected and active
How to draw custom Window Caption on FoxPro form
How to prevent users from accessing the Windows Desktop and from switching to other applications
Using FoxTray ActiveX control: System Tray Icon and menu attached to VFP form
Using the LoadImage function to have a bitmap file loaded and displayed on VFP main window
Winsock: retrieving Web pages using sockets (HTTP, port 80)
Analyzing character types in a specified string
GDI+: custom Clock Control
How to build UDP responder
Using Path functions from Shell Lightweight Utility APIs (shlapi.dll)
Creating a mailslot
How to view icons stored in executable files (Icon Viewer)
Uploading local file to FTP server with FtpPutFile
Setting the mouse capture to the specified window

User rating: 10/10 (1 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:
See also:
  • How to Move a Form not using its Titlebar or Caption
  • DO declare
    
    * testing the capture
    ? GetCapture()
    
    * setting the mouse capture to the window with the keyboard focus
    ? SetCapture(GetFocus())
    
    * testing the capture
    ? GetCapture()  && returns a window handle
    
    = ReleaseCapture()
    
    PROCEDURE declare
        DECLARE INTEGER SetCapture IN user32 INTEGER hWindow
        DECLARE INTEGER GetCapture IN user32
        DECLARE INTEGER ReleaseCapture IN user32
    
        DECLARE INTEGER GetActiveWindow IN user32
        DECLARE INTEGER GetFocus IN user32
    

    User rating: 10/10 (1 votes)
    Rate this code sample:
    • ~
    478 bytes  
    Created: 2002-02-25 23:41:56  
    Modified: 2009-01-26 14:09:20  
    Visits in 7 days: 131  
    Listed functions:
    GetActiveWindow
    GetCapture
    GetFocus
    ReleaseCapture
    SetCapture
    Printer friendly API declarations
    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-2018 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.39), the Open Source standard SQL database, AceHTML Freeware Version 4, freeware HTML Editor of choice.   Hosted by Korax Online Inc.
    Last Topics Visited (54.82.78.213)
    16 sec.Function: 'CeCloseHandle'
    Function group: 'Remote Application Programming (RAPI)'
    27 sec.Function: 'RevertToSelf'
    42 sec.
    Function group: 'HTTP Functions (WinHTTP)'
    55 sec.Function: 'SHGetStockIconInfo'
    Function group: 'Shell Functions'
    1.1 min.Function: '_lopen'
    Function group: 'File Management'
    1.35 min.Function: 'CeRegSetValueEx'
    Function group: 'Remote Application Programming (RAPI)'
    1.62 min.Example: 'Dragging files from Explorer window and dropping them on FoxPro control (requires VFP9)'
    1.95 min.Function: 'mmioCreateChunk'
    2.27 min.
    Function group: 'Brush'
    2.6 min.Function: 'CeFindFirstDatabaseEx'
    Function group: 'Remote Application Programming (RAPI)'
    Google
    Advertise here!