Using Win32 functions in Visual FoxPro Image Gallery
Code examples:
Dynamic strings implemented through VFP Custom class
Enumerating global and local group accounts on a server (WinNT/XP/2K)
Enumerating print processors and supporting data types installed on the specified server
Extended OS Version info
GDI+: cropping images
GDI+: printing vertical text on VFP reports via generated images (VFP8)
GDI+: retrieving list of available image encoders and image decoders
How to download a file from the FTP server using FtpGetFile
How to test file attributes (key method for FileExists and DirectoryExists routines)
Pocket PC: base class
Quering waveform-audio output devices
Reading security permissions for NTFS files and folders
Retrieving configuration information for the specified server (Win2000/XP)
Starting an external application in VFP using WinExec
Starting external program from VFP and waiting for its termination
The original LoadPicture() function in VFP returns valid handles to bitmaps, icons, cursors, and metafiles
Enumerating servers of the specified type (e.g. SQL Server) in the primary domain
GDI+: Drawing a Pie Chart
GDI+: how to make VFP controls visually shake and shudder
GDI+: printing vertical text on VFP reports via generated images (VFP9)
GetProcessVersion points at target OS
How to delete file on FTP server
How to enumerate sessions and processes on a specified terminal server
How to obtain Content-Type value for a file type from the System Registry
The original LoadPicture() function in VFP returns valid handles to bitmaps, icons, cursors, and metafiles

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
Before you begin:
Provide valid file names when calling this function.


* provide valid file names

= LoadObject("badge.bmp")
= LoadObject("BACKGRND.GIF")
= LoadObject("BD04956_.WMF")
= LoadObject("FILES10.ICO")
= LoadObject("H_POINT.CUR")

PROCEDURE LoadObject (lcFilename)
    LOCAL obj
    ? "Filename:", FULLPATH(lcFilename)

    IF FILE(lcFilename)
        obj = LoadPicture (lcFilename)

    IF TYPE("obj") = "O"
        ? "Handle:", obj.handle
        ? "Handle type:", GetObjectType(obj.handle)
        ? "Width:", obj.width
        ? "Height:", obj.height
        ?? " -- not accessible"

User rating: 0/10 (0 votes)
Rate this code sample:
  • ~
640 bytes  
Created: 2002-03-31 14:09:12  
Modified: 2003-04-23 22:22:10  
Visits in 7 days: 66  
Listed functions:
Printer friendly API declarations
My comment:
The LoadPicture() function (note this is a VFP function, not Win32 one) loads bitmap files as well as GIF and JPEG files, converting them into memory bitmaps. So after all you get valid bitmap handle -- no need to implement Win32-based algorithms for reading GIFs and JPEGs.
Word Index links for this example:
Translate this page:
  Spanish    Portuguese    German    French    Italian offers instant, free translations of text or web pages.
User Contributed Notes:
There are no notes on this subject.

Copyright 2001-2016 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.5.46), the Open Source standard SQL database, AceHTML Freeware Version 4, freeware HTML Editor of choice.   Hosted by Korax Online Inc.
Last Topics Visited (
3.97 min.Function: 'IsChild'
Function group: 'Window'
9.78 min.Function: 'JetCommitTransaction'
4 day(s)Function: 'NetWkstaUserEnum'
Function group: 'Network Management'
 Example: 'Peer-to-peer LAN messenger built with Mailslot API functions'
 Function: 'inet_addr'
Function group: 'Windows Sockets 2 (Winsock)'
 Example: 'Obtaining I/O counts for the current process'
7 day(s)Function: 'StartService'
 Example: 'Using the DeleteFile'
Page 4
Advertise here!