Using Win32 functions in Visual FoxPro Image Gallery
Code examples:
Accessing examples contained in this reference from a VFP application
Establishing connection using the SQLDriverConnect
Exporting DLL icon resources as .ICO files
GDI+: rotating images using matrix transformations
How to block the PrintScreen key
How to delete all print jobs for a printer
How to extract frames from AVI files
How to suspend or hibernate your system
Obtaining MAC address through Address Resolution Protocol (ARP) request
Reading security permissions for NTFS files and folders
Running a regular FoxPro form while main VFP window is minimized
Disabling drawing in the VFP form
Disconnecting USB Mass Storage Device programmatically
Encapsulating access to the Windows Services in a class
How to generate UUID values
Retrieving statistics for the TCP protocol running on the local computer
Retrieving the names of all sections in an initialization file
Setting the date and time that a file was created
Using IsChild() for testing ThisForm.ShowWindow property
Adding an ODBC data source with the SQLConfigDataSource; use automatic or interactive mode
Configuring DEVMODE structure for a printer
Displaying animated images on FoxPro form with BitBlt and StretchBlt functions
Dragging files from Explorer window and dropping them on FoxPro control (requires VFP9)
How to view icons stored in executable files (Icon Viewer)
Converting an integer value to a hexadecimal string

User rating: 10/10 (1 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:
Check reverse example Converting a hexadecimal string to an integer.
 
? int2hex(100)
 
FUNCTION  int2hex (num)
    DECLARE INTEGER wnsprintf IN Shlwapi;
        STRING @lpOut, INTEGER cchLimitIn,;
        STRING pszFmt, INTEGER
 
    LOCAL lnResult, lcResult
    lcResult = SPACE(20)
    lnResult = wnsprintf(@lcResult, 20, "%x", num)
RETURN Left(lcResult, lnResult)
 
 

User rating: 10/10 (1 votes)
Rate this code sample:
  • ~
282 bytes  
Created: 2002-01-18 20:28:56  
Modified: 2007-02-22 15:34:33  
Visits in 7 days: 105  
Listed functions:
wnsprintf
Printer friendly API declarations
My comment:
This can also be done with:
TRANSFORM(num, "@0")
not including VFP3.
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 (67.202.9.192)
5 sec.Example: 'Reading STARTUPINFO structure for the current VFP session'
1.47 hrs.Function: 'DragAcceptFiles'
Function group: 'Shell Functions'
 Function: 'SetFileTime'
 Example: 'Saving HKEY_LOCAL_MACHINE\\Software\\ODBC Registry Entries to an XML file'
1.69 hrs.
 Example: 'Opening the Page Setup dialog box to specify the attributes of a printed page'
 Function: 'CryptGenRandom'
Function group: 'Cryptography Reference'
2.47 hrs.Example: 'Finding out if the current user is the Guest account'
 Function: 'Escape'
3.5 hrs.Example: 'Drawing Windows frame controls using the DrawFrameControl function'
Google
Advertise here!