Using Win32 functions in Visual FoxPro Image Gallery
Code examples:
Accessing LSA Policy object (Local Security Authority)
Creating a unique filename based on existing filename
Current keyboard type
Displaying standard progress dialog box when copying files
GDI+: how to make VFP controls visually shake and shudder
Printing text on the main VFP window
Disabling drawing in the VFP form
Drawing cursors for the classes defined by the system (preregistered): BUTTON, EDIT, LISTBOX etc.
How to create transparent areas inside a form -- punching holes in the form
Placing an arbitrary rectangular area of main VFP window on the Clipboard
Retrieving file information for the VFP executable running
Using mailslots to send messages on the network
Using the SetErrorMode for determining if a floppy drive is ready
Converting an HTTP time/date string to a SYSTEMTIME structure
GDI+: printing vertical text on VFP reports via generated images (VFP8)
How to copy the image of a form to the Clipboard using Bitmap API functions
How to delete IE cookies, clear IE history and delete files in Temporary Internet Files directory
How to obtain the number of rows affected by remote UPDATE, INSERT or DELETE statement
Listing INF files in a specified directory
Obtaining information about all user accounts on a server (WinNT only)
Printing text on the client area of the main VFP window
Quering waveform-audio output devices
System Image List Viewer
Using Path functions from Shell Lightweight Utility APIs (shlapi.dll)
GDI+: converting image file to another graphics format

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:
The code is based on custom GDI+ class. Download the class module first and save it in gdiplus.prg file.

Make sure the source and target file names are valid. The source file can be in any of graphics formats supported by the GDI+: BMP, GIF, JPG, TIF, EMF...

 
SET PROCEDURE TO gdiplus ADDITIVE
 
* an instance of gdiplusinit should be created before
* and released after using any of gdi+ objects
PRIVATE gdiplus
gdiplus = CREATEOBJECT("gdiplusinit")
 
LOCAL img
img = CREATEOBJECT("gdiimage", "c:\windows\forest.bmp")
WITH img
    .SaveToFile("d:\temp\tmp.bmp")
    .SaveToFile("d:\temp\tmp.gif")
    .SaveToFile("d:\temp\tmp.jpg")
    .SaveToFile("d:\temp\tmp.png")
    .SaveToFile("d:\temp\tmp.tif")
ENDWITH
 
 
 

User rating: 0/10 (0 votes)
Rate this code sample:
  • ~
452 bytes  
Created: 2004-07-05 19:40:43  
Modified: 2011-12-10 09:20:22  
Visits in 7 days: 69  
Listed functions:
Printer friendly API declarations
My comment:
The base class has encoder CLSIDs implemented as constants. Event though it works perfectly, in real-life programming I suggest using the GdipGetImageEncoders function to retrieve parameters of the image encoders currently available on the system.
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 (184.72.184.104)
1.72 hrs.Function: 'NetMessageNameAdd'
 Function: 'MultiByteToWideChar'
Function group: 'Unicode and Character Set'
3.39 hrs.Example: 'Deleting files into the Recycle Bin'
7.93 hrs.Example: 'Who owns the Windows Clipboard'
 Function: 'CreateFile'
14.16 hrs.Function: 'gethostbyname'
18.95 hrs.Example: 'Vertical Label control'
 Function: 'SetBkColor'
19.53 hrs.Function: 'WNetOpenEnum'
20.59 hrs.Example: 'Retrieving information specific to the current Time Zone'
Google
Advertise here!