Using Win32 functions in Visual FoxPro Image Gallery
Code examples:
Using the GetLogicalDriveStrings
Retrieving geometrical parameters of the system desktop window
How to fill a buffer with random bytes using Cryptography API Functions
PocketPC: creating directories and files
Retrieving national language settings
Current directory of the application
Retrieving current user for the process
Using LoadLibrary
Converting characters to upper or lower case
GDI+: converting text strings to images and saving in a graphics file
How to intercept window messages sent to VFP form
Retrieving default spooling directory name
Dynamic strings implemented through VFP Custom class
How to access a file using not its name but an alias (hard link)
Managing Cookies
Retrieving the rectangle area where the mouse cursor is confined
Accessing the list of Windows Recent Documents
Finding the application, icon and friendly names associated with a file name
List of ODBC drivers installed (read from the [ODBC Drivers] section)
Retrieving list of supported paper names (for example, Letter or Legal) for a given printer
Saying "Hello World!" with VFP and WinAPI
Obtaining window class name for the main VFP window
Setting the Window Region for a form
Creating two-byte hashes for a list of URLs
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: 92  
    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 (50.16.132.180)
    34.22 min.Example: 'Winsock: retrieving Web pages using sockets (HTTP, port 80)'
    34.28 min.Example: 'Retrieving graphic capabilities of your display'
    34.33 min.Function: 'CloseEventLog'
    Function group: 'Event Logging'
    1.35 hrs.Example: 'Placing an arbitrary rectangular area of main VFP window on the Clipboard'
     Function: 'LookupAccountSid'
    1.45 hrs.Function: 'GetEnvironmentStrings'
    Function group: 'Process and Thread'
     Example: 'Windows Shell Icons displayed and exported to ICO files (Vista)'
     Function: 'socket'
    5.1 hrs.Example: 'GDI+: converting image file to another graphics format'
    6.46 hrs.Example: 'How to find when the application started'
    Google
    Advertise here!