Using Win32 functions in Visual FoxPro Image Gallery
Code examples:
How to change display settings: screen resolution, screen refresh rate
Enumerating data formats currently available on the clipboard
Custom GDI+ class
Capturing keyboard activity of another application with the Raw Input API (VFP9)
Mapping and disconnecting network drives
Winsock: retrieving directory listing from an FTP server using passive data connection (FTP, port 21)
Winsock: sending email messages (SMTP, port 25)
How to display the Properties dialog box for a file (ShellExecuteEx)
Disk in drive A:
Enumerating raw input devices attached to the system (keyboard, mouse, human interface device)
Detecting changes in connections to removable drives (VFP9)
How to download a file from the FTP server using FtpGetFile
Using Font and Text functions
How to play AVI file on the _screen
Using Video Capture: displaying on FoxPro form frames and previewing video obtained from a digital camera
Using EnumPrinters function to enumerate locally installed printers
Running MSDOS Shell as a child process with redirected input and output (smarter RUN command)
Splash Screen for the VFP application
Creating irregularly shaped FoxPro form using transparency color key
Converting Unicode data from the Clipboard to a character string using a given code page
Subclassing CommandButton control to create BackColor property
Vertical Label control
Enumerating network resources
Creating a console window for Visual FoxPro application
Using the CopyFile

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:
See also:
  • Copying files as a transacted operation
  • Displaying standard progress dialog box when copying files
  • Deleting file into the Recycle Bin

  •  
    DECLARE INTEGER CopyFile IN kernel32;
        STRING lpExistingFileName,;
        STRING lpNewFileName,;
        INTEGER bFailIfExists
     
    ? CopyFile("C:\Autoexec.bat", "C:\Autoexec.cpy", 0)
     
     
     

    User rating: 0/10 (0 votes)
    Rate this code sample:
    • ~
    175 bytes  
    Created: 2001-07-12 12:00:00  
    Modified: 2010-07-30 08:31:37  
    Visits in 7 days: 78  
    Listed functions:
    CopyFile
    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:
    priya@datalinks-india.com | 2005-05-20 13:05:12
    Generally, In our codes while using scatter memvar kind of commands, in some cases accidently, if a database file is not opened prior to that, the file open dialog pops up. Just want to know, if there is any flag which we can access as programmers to know that the open dialog is about to pop up, since in windows environment the users may accidently delete the files by pointing on to it.

    Kindly advise, Thank you.
    David Le Mesurier | 2006-06-20 07:57:49
    Is there a way to copy a whole directory and all it's children?
    A.M. | 2006-06-20 09:41:09
    Hi David,

    Take a look at "My Comment" section for example=508 -- there's Windows Scripting code doing exactly what you've asked. Otherwise use SHFileOperation function.

    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.224.75.101)
    1.51 hrs.Example: 'Custom GDI+ class'
    2.04 hrs.Function: 'MAPISendMail'
    Function group: 'Simple MAPI'
     Function: 'AVIFileInit'
    Function group: 'Windows Multimedia'
     Function: 'GdipCreateHICONFromBitmap'
    Function group: 'GDI+ Bitmap'
    8.54 hrs.Example: 'Retrieving configuration information for the specified server (Win2000/XP)'
     Example: 'Who owns the Windows Clipboard'
     Example: 'How to put a horizontal text scrolling on the form (a news line)'
    10.59 hrs.Example: 'How to play AVI file on the _screen'
     Example: 'Retrieving list of Global Atom names'
    11.27 hrs.Links
    Google
    Advertise here!