Using Win32 functions in Visual FoxPro Image Gallery
Code examples:
Enumerating network sessions established on a server
Enumerating the subkeys for a given registry key
High-powered ALLTRIM
How to download this reference`s archive through WinInet functions using InternetOpenUrl
Locking the workstation
Retrieving top-child window for the VFP form
Scanning the hierarchy of child windows down from the main VFP window
Uploading file to the FTP server using InternetWriteFile
Writing entries to custom Event Log
Adding printer to the list of supported printers for the specified server
Enumerating ODBC Data Sources available on the local computer
Enumerating the subkeys of a user-specific key
Extracting the name and extension parts of a path string
GDI+: rotating images using matrix transformations
How to enumerate terminal servers within the specified Windows domain
How to make the caption of a VFP application flashing in the Windows task bar
How to obtain the number of rows affected by remote UPDATE, INSERT or DELETE statement
OS version and revision
Simple Window Viewer
Storing the environment strings in cursor
Using the CreateFile
Converting twips to pixels and vice versa
Finding the path to the VFP executable running
GDI+: Scrolling through large image using the mouse
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: 53  
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 (
23 sec.Example: 'Displaying system dialog that selects a folder'
1.63 min.Function: 'IsValidSid'
2.02 min.Function: 'UuidCreate'
18.09 hrs.Example: 'Retrieving the name of the network resource associated with a local device'
 Example: 'Winsock: sending email messages (SMTP, port 25)'
 Example: 'Testing serial ports'
18.1 hrs.Function: 'InternetGetConnectedStateEx'
Function group: 'Internet Functions (WinInet)'
Advertise here!