Using Win32 functions in Visual FoxPro Image Gallery
Code examples:
How to change display settings: screen resolution, screen refresh rate
Custom GDI+ class
Winsock: sending email messages (SMTP, port 25)
Using EnumPrinters function to enumerate locally installed printers
Semi-transparent Form
Custom HttpRequest class (WinHTTP)
Using Video Capture: displaying on FoxPro form frames and previewing video obtained from a digital camera
Custom FTP Class for Visual FoxPro application
How to convert a bitmap file to monochrome format (1 bpp)
Custom HttpRequest class (WinINet)
Compressing and decompressing files with Windows API Runtime Library routines
Printing Image File, programmatically set print page orientation to landscape
How to create MD-5 and SHA-1 hash values from a string
Using FoxTray ActiveX control: System Tray Icon and menu attached to VFP form
GDI+: Creating thumbnails to preview images in a directory
Adding icon to the systray (requires VFP9)
Extended MessageBox Class
How to detect if additional monitor is connected and active
How to ping a remote site using ICMP API calls
GDI+: Storing content of the Clipboard to a bitmap file
Transparent Menu Class (requires VFP9)
Using Month Calendar Control (VFP9, Comctl32.dll)
How to activate Windows Calculator
How to print FoxPro form
Retrieving the command line for the VFP session

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:
  • How to: Use Command-Line Options When Starting Visual FoxPro

  •  
    DO declare
     
    LOCAL nAddress, cBuffer, nBufsize
    nAddress = GetCommandLine()  && returns an address in memory
    nBufsize = GlobalSize(nAddress)
     
    * allocating and filling a buffer
    IF nBufsize <> 0
        cBuffer = Repli(Chr(0), nBufsize)
        = CopyMemory(@cBuffer, nAddress, nBufsize)
    ELSE
    * a possibility in Win98/Me
        cBuffer = Repli(Chr(0), 512)
        = CopyMemory(@cBuffer, nAddress, 512)
        cBuffer = SUBSTR(cBuffer, 1, AT(Chr(0)+Chr(0),cBuffer)+1)
    ENDIF
     
    cBuffer = STRTRAN(cBuffer, CHR(0), "")
    ? "Command line: [" + cBuffer + "]"
     
    PROCEDURE declare
        DECLARE INTEGER GetCommandLine IN kernel32
     
        DECLARE INTEGER GlobalSize IN kernel32;
            INTEGER hMem
     
        DECLARE RtlMoveMemory IN kernel32;
        As CopyMemory;   
            STRING @Destination, INTEGER Source,;
            INTEGER nLength
     
     
     

    User rating: 0/10 (0 votes)
    Rate this code sample:
    • ~
    779 bytes  
    Created: 2001-07-19 12:00:00  
    Modified: 2010-07-08 04:09:10  
    Visits in 7 days: 16  
    Listed functions:
    GetCommandLine
    GlobalSize
    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-2010 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.0.85), the Open Source standard SQL database, AceHTML Freeware Version 4, freeware HTML Editor of choice.   Hosted by Korax Online Inc.
    Last Topics Visited (38.107.191.108)
    2.35 min.
    13.32 min.Function: 'waveInOpen'
    Function group: 'Windows Multimedia'
    41.37 min.Example: 'How to view icons stored in executable files (Icon Viewer) - II'
    43.12 min.Function: 'waveOutUnprepareHeader'
    Function group: 'Windows Multimedia'
    1.03 hrs.
    1.09 hrs.
    Function group: 'String'
    1.19 hrs.Example: 'Printing Image File, programmatically set print page orientation to landscape'
    2 day(s)Function: 'GetErrorMode'
     
    Function group: 'File Mapping'
     Function: 'GetObject'
    Google
    Advertise here!