Using Win32 functions in Visual FoxPro Image Gallery
Code examples:
How to change display settings: screen resolution, screen refresh rate
Custom GDI+ class
Capturing keyboard activity of another application with the Raw Input API (VFP9)
How to display Windows On-Screen Keyboard
How to print a bitmap file
Using the LoadImage function to have a bitmap file loaded and displayed on VFP main window
Winsock: sending email messages (SMTP, port 25)
System Image List Viewer
Creating the Save dialog box to specify the drive, directory, and name of a file to save
Using Video Capture: displaying on FoxPro form frames and previewing video obtained from a digital camera
Custom HttpRequest class (WinHTTP)
Printing Image File, programmatically set print page orientation to landscape
How to convert a bitmap file to monochrome format (1 bpp)
The window and its ancestors
Mapping and disconnecting network drives
How to download a file from the FTP server using FtpGetFile
Using EnumPrinters function to enumerate locally installed printers
Custom FTP Class for Visual FoxPro application
Displaying the associated icons and descriptions for files and folders
Displaying icons in the system tray (VFP9)
How to activate Windows Calculator
Drawing Windows predefined bitmaps using the LoadBitmap functions
Using FoxTray ActiveX control: System Tray Icon and menu attached to VFP form
Confining Windows calculator inside the VFP main window
Enumerating the subkeys for a given registry key

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
 
#DEFINE ERROR_SUCCESS  0
#DEFINE HKEY_CLASSES_ROOT 0x80000000
#DEFINE HKEY_CURRENT_USER 0x80000001
#DEFINE HKEY_LOCAL_MACHINE 0x80000002
#DEFINE HKEY_USERS 0x80000003
#DEFINE HKEY_PERFORMANCE_DATA 0x80000004
#DEFINE HKEY_CURRENT_CONFIG 0x80000005
#DEFINE HKEY_DYN_DATA  0x80000006
 
    DO decl
    CREATE CURSOR csKeys (topkey C(30), subkey C(50))
 
*    = enumKeys ("HKEY_CLASSES_ROOT", HKEY_CLASSES_ROOT)
    = enumKeys ("HKEY_CURRENT_USER", HKEY_CURRENT_USER)
    = enumKeys ("HKEY_LOCAL_MACHINE", HKEY_LOCAL_MACHINE)
*    = enumKeys ("HKEY_USERS", HKEY_USERS)
*    = enumKeys ("HKEY_PERFORMANCE_DATA", HKEY_PERFORMANCE_DATA)
*    = enumKeys ("HKEY_CURRENT_CONFIG", HKEY_CURRENT_CONFIG)
*    = enumKeys ("HKEY_DYN_DATA", HKEY_DYN_DATA)
 
    SELECT csKeys
    INDEX ON topkey+subkey TAG subkey
    GO TOP
    BROWSE NORMAL NOWAIT
 
PROCEDURE  enumKeys (lcTopKey, hTopKey)
    LOCAL lnIndex, lcName, lnNameLen
    lnIndex = 0
 
    DO WHILE .T.
        lnNameLen = 250
        lcName = Repli (Chr(0), lnNameLen)
 
        IF SHEnumKeyEx (hTopKey, lnIndex, @lcName, @lnNameLen) = ERROR_SUCCESS
            INSERT INTO csKeys VALUES (lcTopKey, Left (lcName, lnNameLen))
        ELSE
            EXIT
        ENDIF
        lnIndex = lnIndex + 1
    ENDDO
RETURN
 
PROCEDURE  decl
    DECLARE INTEGER SHEnumKeyEx IN shlwapi;
        INTEGER   hkey,;
        INTEGER   dwIndex,;
        STRING  @ pszName,;
        INTEGER @ pcchName
 
 

User rating: 10/10 (1 votes)
Rate this code sample:
  • ~
1354 bytes  
Created: 2001-09-03 12:00:00  
Modified: 2008-11-03 15:26:13  
Visits in 7 days: 82  
Listed functions:
SHEnumKeyEx
Printer friendly API declarations
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 (50.16.36.153)
4 sec.Example: 'Form Magnifier'
19.5 min.Example: 'Creating the Open dialog box to specify the drive, directory, and name of a file to open'
19.57 min.Example: 'Validating the heap of the calling process'
26.03 min.Example: 'How to change the name and the size of the font in the MessageBox dialog'
26.12 min.Example: 'Minimizing all running applications'
26.18 min.Function: 'GetObjectType'
Function group: 'Device Context'
1.9 hrs.Example: 'How to make a VFP form fading out when released (GDI version)'
3.44 hrs.Function: 'CreateProcessAsUser'
Function group: 'Process and Thread'
4.91 hrs.Example: 'How to delete IE cookies, clear IE history and delete files in Temporary Internet Files directory'
 Example: 'Encapsulating access to the Windows Services in a class'
Google
Advertise here!