Using Win32 functions in Visual FoxPro Image Gallery
Code examples:
GDI+: rotating images using matrix transformations
How to check whether the system is 32-bit or 64-bit
How to find which fonts Windows uses for drawing captions, menus and message boxes
How to retrieve list of system DSNs (Data Source Name) with parameters
Minimizing all running applications
OS version and revision
Playing WAV files on InteractiveChange
Printf-style formatted text output in VFP
Quering Audio Mixer Device
Quering waveform-audio output devices
Reading and setting system access privileges for the current process
Retrieving statistics for the TCP protocol running on the local computer
Retrieving the System Time adjustment
Retrieving top-child window for the VFP form
Running a regular FoxPro form while main VFP window is minimized
Simple MAPI: how to pick an email recipient from Outlook Express address book
The window and its ancestors
Using the SetErrorMode for determining if a floppy drive is ready
Writing entries to custom Event Log
Yet another modal dialog: now HTML-based
Converting twips to pixels and vice versa
Enumerating MIDI output devices
GDI+: Drawing a Pie Chart
GDI+: printing vertical text on VFP reports via generated images (VFP9)
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: 50  
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-2014 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.68), the Open Source standard SQL database, AceHTML Freeware Version 4, freeware HTML Editor of choice.   Hosted by Korax Online Inc.
Last Topics Visited (
15.1 hrs.Example: 'How to display Windows On-Screen Keyboard'
 Function: 'GetWindowPlacement'
Function group: 'Window'
 Function: 'NetShareDel'
Function group: 'Network Management'
 Function: 'GdipDrawRectangle'
 Example: 'Reading and setting explicit Application User Model ID for the current process (Win7)'
15.11 hrs.Function: 'OpenPrinter'
Advertise here!