Using Win32 functions in Visual FoxPro Image Gallery
Code examples:
Printing text with the Escape function
Using the GetLogicalDriveStrings
Winsock: retrieving information from a host database for a given host name
CryptoAPI: Collection of Providers class
Minimizing all running applications
Obtaining addresses for the adapters on the local computer (Win XP/2003/Vista)
Retrieving list of supported paper names (for example, Letter or Legal) for a given printer
Using SQLBrowseConnect to connect to a data source through a number of iterative calls (SQL Server)
An alternative way of setting Form.Closable to False
Determining whether or not the system is connected to the Internet
GDI+: creating scaled copy of image file
How to display picture stored in enhanced-format metafile (*.emf)
Reading entries from Event logs
Retrieving geometrical parameters of the system desktop window
Retrieving the rectangle area where the mouse cursor is confined
Using Custom FTP class (DEFINE CLASS ftp As Custom)
Creating hash values for the list of names
How to find when the application started
Reading and setting system access privileges for the current process
Accessing Windows Control Panel from VFP Application
GDI+: reading and writing metadata in JPEG and TIFF files
How to drag a Form not using its Titlebar or Caption
How to view icons stored in executable files (Icon Viewer) - II
Simple MAPI: how to pick an email recipient from Outlook Express address book
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: 114  
    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 (72.44.48.122)
    50.37 min.Function: 'NetApiBufferFree'
    50.42 min.Example: 'Retrieving the rectangle area where the mouse cursor is confined'
    50.48 min.Function: 'IsMenu'
    Function group: 'Menu'
    4.8 hrs.Function: 'waveOutSetVolume'
     Function: 'EnumClipboardFormats'
    6.06 hrs.Example: 'Enumerating Processes -- WinNT'
    13.27 hrs.Function: 'if_indextoname'
     Example: 'Storing content of the Clipboard to a bitmap file'
    13.39 hrs.Function: 'waveOutGetNumDevs'
    Function group: 'Windows Multimedia'
     Function: 'GetOEMCP'
    Function group: 'National Language Support'
    Google
    Advertise here!