Using Win32 functions in Visual FoxPro Image Gallery
Code examples:
WAV file player
How to upload a local file to FTP server using FtpPutFile
Retrieving size of a remote file
Using WM_COPYDATA for interprocess communication (VFP9)
Setting the mouse capture to the specified window
Using MessageBeep
Using the SystemParametersInfo function
GDI+: sending image of FoxPro form to printer
How to display the port-configuration dialog box for a port on the specified server
Locking the workstation
Quering a waveform-audio input device
Retrieving list of all active RAS connections
Retrieving Printer Device Context using PrintDlg function
Setting the volume label
HOWTO: Use the Win32 API to Access File Dates and Times
Semi-transparent Form
Enumerating Volumes and Volume Mounting Points (NTFS)
The original LoadPicture() function in VFP returns valid handles to bitmaps, icons, cursors, and metafiles
Converting an HTTP time/date string to a SYSTEMTIME structure
Displaying OS Memory Status
How to create transparent areas inside a form -- punching holes in the form
Setting the date and time that a file was created
Using the NetMessageBufferSend to send messages on the network
GDI+: saving image of FoxPro form to graphics file (BMP, GIF, JPG, PNG, TIF)
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
Versions:
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:
      Password:
     
     
      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: 109  
    Listed functions:
    CloseHandle
    CreateFile
    GetLastError
    ReadDirectoryChangesW
    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  
    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.180.187)
    4 sec.Example: 'How to print FoxPro form'
    3.43 hrs.Example: 'How to retrieve configuration data for a specified printer stored in the registry (PrinterDriverData key)'
     Function: 'GdipGetDpiX'
    5.04 hrs.Example: 'Retrieving the name of the network resource associated with a local device'
     Example: 'Using the SetErrorMode for determining if a floppy drive is ready'
    7.95 hrs.Example: 'Placing an arbitrary rectangular area of main VFP window on the Clipboard'
    8.69 hrs.
     Function: 'GetSubMenu'
    Function group: 'Menu'
    11.74 hrs.Function: 'SetPriorityClass'
    Function group: 'Process and Thread'
    11.75 hrs.Example: 'Displaying Windows shell folders in TreeView control with Visual FoxPro FLL'
    Google
    Advertise here!