Using Win32 functions in Visual FoxPro Image Gallery
Code examples:
Using Multimedia Command Strings to play MIDI files
Creating a file, then moving it to another destination
GDI+: enumerating fonts installed on the system
Converting characters to upper or lower case
Retrieving the System Time adjustment
Searching for the specified file using the SearchPath
Listing device drivers in the system: load addresses, names
Obtaining window class name for the main VFP window
CryptoAPI: retrieving list of providers
GDI+: loading image file, drawing on it, saving the result to another file
Joining local computer to a domain (XP/2000)
Retrieving national language settings
Retrieving the path of the printer-driver directory and printer-processor directory
Enumerating Performance Counters
Finding the application, icon and friendly names associated with a file name
How to access a file using not its name but an alias (hard link)
Obtaining the System and Windows folder names
PocketPC: creating directories and files
Using GetCompressedFileSize (WinNT only)
Retrieving default spooling directory name
Setting the last-error code for the FoxPro
Using ActiveX control for adding a menu directly to a FoxPro MDI form
Displaying the color palette stored in an image file
How to fill a buffer with random bytes using Cryptography API Functions
How to create a desktop shortcut (shell link)

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:
  • Moving shortcut to a specified position on the Windows Desktop
  •  
    * The following code creates a shortcut to the current VFP application
    * and places it on the Windows Desktop
     
    LOCAL oShell, cDesktopPath, oShortcut, ex As Exception
     
    TRY
        oShell = CREATEOBJECT("Wscript.shell")
     
        cDesktopPath = oShell.SpecialFolders("Desktop")
     
        oShortcut = oShell.CreateShortcut(;
            cDesktopPath + "\Visual FoxPro Test.lnk")
     
        WITH oShortcut
            .TargetPath = _vfp.ServerName
            .WorkingDirectory = JUSTPATH(_vfp.ServerName)
            .Description = _vfp.Application.Name
            .WindowStyle = 3  && Maximized
     
            .Save
        ENDWITH
     
    CATCH TO ex
        = MESSAGEBOX(TRANSFORM(ex.ErrorNo) + ". " +;
            ex.Message, 48, "Creating shortcut failed")
     
    ENDTRY
     

    User rating: 0/10 (0 votes)
    Rate this code sample:
    • ~
    668 bytes  
    Created: 2012-02-19 18:33:22  
    Modified: 2012-02-19 18:41:12  
    Visits in 7 days: 110  
    Listed functions:
    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-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 (23.22.252.150)
    4 sec.Function: 'GetRegionData'
    1.5 hrs.Example: 'Retrieving the System Time adjustment'
     Function: 'NetShareDel'
    2.12 hrs.Example: 'Initiating Inet connection using a modem'
     Function: 'waveInReset'
    4.55 hrs.Example: 'Pocket PC: custom RAPI class for operating with the Object Store Databases'
    6.65 hrs.Function: 'GlobalAlloc'
    Function group: 'Memory Management'
    8.87 hrs.Example: 'Obtaining list of tables stored in an ODBC Data Source'
    8.88 hrs.Example: 'Storing screen shot of a form to enhanced metafile (*.emf)'
     Example: 'Creating an Open dialog box to specify the drive, directory, and name of a file to open (Shell32 version)'
    Google
    Advertise here!