Using Win32 functions in Visual FoxPro Image Gallery
Code examples:
Setting the date and time that a file was created
Extended MessageBox Class
How to find which fonts Windows uses for drawing captions, menus and message boxes
Playing WAV files on InteractiveChange
Start an executable from VFP application by using the CreateProcess
The window and its ancestors
Listing INF files in a specified directory
Retrieving the name of the primary domain controller (PDC) and join status information
Starting a dialog box for connecting to network resources (mapping network drive)
Finding out if the current user is the Guest account
How to assemble an array of strings and pass it to external function
How to make application automatically close all documents it opened
Placing On-screen Alert on top of all windows
Using the GradientFill function
GDI+: custom Clock Control
How to access a file using not its name but an alias (hard link)
How to enumerate, add and delete shares on the local computer (WinNT/XP)
Minimizing all running applications
Using Video Capture: displaying on FoxPro form frames and previewing video obtained from a digital camera
Dragging files from Explorer window and dropping them on FoxPro control (requires VFP9)
How to enumerate cookies and URL History entries in the cache of the local computer
Setting default printer
Using Beep and Sleep functions to make the old tin buzz sing (WinNT only?)
How to read email messages using Simple MAPI
Setting the date and time that a file was created

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
  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:
  • ~
1790 bytes  
Created: 2001-07-25 12:00:00  
Modified: 2011-12-10 09:20:22  
Visits in 7 days: 185  
Listed functions:
Printer friendly API declarations
My comment:
The file handle must have been created with GENERIC_WRITE access to the file.

I tried to create the handle by using native FOPEN() function with different attributes. It did not work.

You can change any of three file time values or a combination of them. But not all file systems can record creation and last access time and not all file systems record them in the same manner. This way you can set the creation time to be later than its access and modification times.

* * *
In C# version, I use managed FileInfo object instead of accessing file times through the System.Runtime.InteropServices namespace.
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-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 (
4 sec.
8 sec.Function: 'SetVolumeMountPoint'
Function group: 'File System'
14 sec.Function: 'CeDeleteRecord'
Function group: 'Remote Application Programming (RAPI)'
16 sec.Function: 'WNetOpenEnum'
Function group: 'Windows Networking'
19 sec.Function: 'FindFirstVolume'
Function group: 'File System'
22 sec.Example: 'Saying "Hello World!" with VFP and WinAPI'
24 sec.Function: 'PathGetShortPath'
Function group: 'Shell Lightweight Utility APIs -- Path Functions'
26 sec.Function: 'CreateStreamOnHGlobal'
Function group: 'COM'
28 sec.Function: 'gethostbyaddr'
Function group: 'Windows Sockets 2 (Winsock)'
35 sec.Function: 'GetMonitorCapabilities'
Function group: 'Monitor Configuration (Vista)'
Advertise here!