Using Win32 functions in Visual FoxPro Image Gallery
Code examples:
Retrieving list of files on the FTP directory
Sending email messages with Simple MAPI
Copying picture of the active form to the Clipboard using Enhanced Metafile API functions
Getting a bit more than the _CLIPTEXT offers
How to change the name and the size of the font in the MessageBox dialog
How to enumerate cookies and URL History entries in the cache of the local computer
How to retrieve adapter information for the local computer (including MAC address)
Creating irregularly shaped FoxPro form using transparency color key
Enumerating printer drivers installed
Loading a string resource from an executable file
Mapping and disconnecting network drives
Reading security permissions for NTFS files and folders
Setting properties of the window: caption and user-defined value
Using InternetSetFilePointer when resuming interrupted download from the Internet
Using WM_COPYDATA for interprocess communication (VFP9)
Enumerating global and local group accounts on a server (WinNT/XP/2K)
How to delete IE cookies, clear IE history and delete files in Temporary Internet Files directory
How to draw custom Window Caption on FoxPro form
Pocket PC: custom RAPI class for operating with files and folders on mobile device
Using Path functions from Shell Lightweight Utility APIs (shlapi.dll)
Yet another modal dialog: now HTML-based
Controlling master audio volume by sending WM_APPCOMMAND messages
Creating the Save dialog box to specify the drive, directory, and name of a file to save
Disconnecting USB Mass Storage Device programmatically
Monitoring changes occurring within a directory

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:
To stop the following code after it has been started, open and save any file in C:\TEMP directory.

See also:
  • FileSystemWatcher ActiveX Control for Visual FoxPro
  • Monitoring changes in a directory
  • Enumerating files opened on the network
      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:
    • ~
    1841 bytes  
    Created: 2003-05-09 09:16:21  
    Modified: 2011-02-16 13:28:54  
    Visits in 7 days: 89  
    Listed functions:
    Printer friendly API declarations
    My comment:
    To stop the following code after it has been started, open and save any file in C:\TEMP directory.

    * * *
    The C++ sample displays file and directory changes for drive C in a console window. Close the window when you no longer need it.

    This code itself makes an interesting tool. Download C++ project, compile and start the executable. Then open VFP or IE window, or even move the mouse above the Windows taskbar -- you will see how many files and directory modifications may hide behind such a simple action.

    * * *
    Deleting a directory with subdirectories into the Recycle Bin produces a single FILE_NOTIFY_INFORMATION structure with the directory data. While a direct delete (the Recycle Bin is bypassed) triggers ReadDirectoryChangesW for each subdirectory, and finally for the directory.

    * * *
    When designing a file monitoring utility (FLL or ActiveX control), it should be considered that VFP creates single threaded applications.

    While busy with processing directory changes, an application is unable to receive other changes coming. Frequent changes and substantial processing time make such miss unavoidable.

    Thus a VFP application must receive not the actual directory changes, but rather be notified when they occur. Notifications may come through window messages or by events raised.

    A monitoring utility must take care of piling changes in its own memory, and dispatching them to a client application upon request.
    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.36), the Open Source standard SQL database, AceHTML Freeware Version 4, freeware HTML Editor of choice.   Hosted by Korax Online Inc.
    Last Topics Visited (
    9 sec.Example: 'Testing serial ports'
    18 sec.Function: 'StartPage'
    Function group: 'Printing and Print Spooler'
    27 sec.Example: 'Dragging files from Explorer window and dropping them on FoxPro control (requires VFP9)'
    39 sec.Function: 'TaskDialogIndirect'
    50 sec.Example: 'How to retrieve the number of print jobs queued for the printer'
    1 min.Example: 'How to display Windows On-Screen Keyboard'
    1.2 min.Function: 'GdipGetDpiX'
    1.35 min.
    Function group: 'GDI+ Bitmap'
    1.53 min.
    Function group: 'Error Handling'
    1.73 min.Function: 'SendMessage'
    Advertise here!