Using Win32 functions in Visual FoxPro Image Gallery
Code examples:
Reading and setting explicit Application User Model ID for the current process (Win7)
Retrieving list of files on the FTP directory
Retrieving the state of your Internet connection
Winsock: retrieving the standard host name and IP address for the local machine
Determining if an Active Network Connection is Available
Drawing icons associated with the VFP main window
Extracting the name and extension parts of a path string
How to intercept window messages sent to VFP form
Obtaining I/O counts for the current process
Retrieving Printer Device Context using PrintDlg function
Scanning a hierarchy of child windows down from the Windows Desktop
URL: splitting into its component parts
GDI+: cropping images
How to position the GETPRINTER() dialog
Retrieving list of supported paper names (for example, Letter or Legal) for a given printer
Setting properties of the window: caption and user-defined value
String representation for disk or memory capacity
Using the Semaphore object to allow only one instance of VFP application running
Wininet last error description
Winsock: changing the byte ordering
Adding printer to the list of supported printers for the specified server
Finding the path to the VFP executable running
How to view system icons for the classes installed on the local machine
Opening access to the Microsoft Internet functions for the application
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: 96  
    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)
    4 sec.Example: 'Creating a directory on the FTP'
    7.25 min.Function: 'getservbyname'
    7.35 min.Function: 'NetMessageNameAdd'
    Function group: 'Network Management'
    4.21 hrs.Example: 'Round FoxPro form'
     Function: 'MAPILogon'
    Function group: 'Simple MAPI'
    5.13 hrs.Function: 'DeleteEnhMetaFile'
    5.37 hrs.Function: 'StartPage'
    5.75 hrs.Function: 'GdipScaleTextureTransform'
    6.31 hrs.Example: 'How to play MIDI notes'
    17.47 hrs.Example: 'Windows Shell Icons displayed and exported to ICO files (Vista)'
    Google
    Advertise here!