Using Win32 functions in Visual FoxPro Image Gallery
Code examples:
Winsock: sending email messages (SMTP, port 25)
Obtaining names and positions for shortcuts located on the Windows Desktop
Custom GDI+ class
GDI+: Implementing image scrolling with inertia
Displaying dimmed window behind VFP top-level form
Splash Screen for the VFP application
How to load a user profile
Moving shortcut to a specified position on the Windows Desktop
Enumerating devices installed on the local machine
How to change display settings: screen resolution, screen refresh rate
Disconnecting USB Mass Storage Device programmatically
Vertical Label control
Subclassing CommandButton control to create BackColor property
Monitoring clipboard content changes (VFP9)
System Image List Viewer
How to enable the SE_SHUTDOWN_NAME privilege for the application
Browsing Windows Known Folders (Special Folders)
Printing text with the Escape function
How to put a vertical text scrolling on the form (a movie cast)
Class library providing access to the System Registry
Reading and setting system access privileges for the current process
Capturing keyboard activity of another application with the Raw Input API (VFP9)
How to make a VFP form fading out when released (GDI version)
How to put a horizontal text scrolling on the form (a news line, marquee)
Class library providing access to the System Registry

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 following code includes classes registry, regkey, regkeys, regvalue and regvalues. All together they provide view, read, write and delete functionality for the System Registry. Examples showing how to use this class are coming soon.

Create Registry object before using any other class from this library. This object contains API declarations the other classes use.

LOCAL rg As Registry
rg = CREATEOBJECT("Registry")

The next snip opens Software key in HKEY_LOCAL_MACHINE and adds _test subkey to it.

LOCAL rgkey As regkey
rgkey = CREATEOBJECT("regkey",;
        HKEY_LOCAL_MACHINE, "Software")

WITH rgkey
        IF .OpenKey()
                .CreateSubkey("_test", "")
        ENDIF
ENDWITH

And the last one adds several values to a key.

WITH rgkey
        IF .OpenKey()
                .SetValue("TestValue0", 0, 16) && REG_NONE
                .SetValue("TestValue1", 1, "abc") && REG_SZ
                .SetValue("TestValue3", 3, "abc") && REG_BINARY
                .SetValue("TestValue4", 4, "128") && REG_DWORD
        ENDIF
ENDWITH


Usage samples:
  • Enumerating Windows Sound Schemes avaialble to the current user

  •  
      Members area. Log in to view this example.
     
      User name:
      Password:
     
     
      Forgot your password?
     
      Sign up for
    the Membership
     
     


    User rating: 0/10 (0 votes)
    Rate this code sample:
    • ~
    8222 bytes  
    Created: 2004-10-18 19:25:31  
    Modified: 2013-11-17 19:04:54  
    Visits in 7 days: 188  
    Listed functions:
    RegCloseKey
    RegCreateKeyEx
    RegDeleteKey
    RegDeleteValue
    RegEnumKeyEx
    RegEnumValue
    RegOpenKeyEx
    RegQueryInfoKey
    RegSetValueEx
    Printer friendly API declarations
    My comment:
    RegDeleteKey: the subkey to be deleted must not have subkeys. CeRegDeleteKey (Windows CE, RAPI) deletes the subkey regardless of whether it has its own subkeys.
    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-2018 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.6.39), the Open Source standard SQL database, AceHTML Freeware Version 4, freeware HTML Editor of choice.   Hosted by Korax Online Inc.
    Last Topics Visited (54.82.78.213)
    14 sec.Function: 'GetEnvironmentStrings'
    Function group: 'Process and Thread'
    24 sec.
    53 sec.Function: 'CeCloseHandle'
    Function group: 'Remote Application Programming (RAPI)'
    1.07 min.Function: 'RevertToSelf'
    1.32 min.
    Function group: 'HTTP Functions (WinHTTP)'
    1.53 min.Function: 'SHGetStockIconInfo'
    Function group: 'Shell Functions'
    1.72 min.Function: '_lopen'
    Function group: 'File Management'
    1.97 min.Function: 'CeRegSetValueEx'
    Function group: 'Remote Application Programming (RAPI)'
    2.23 min.Example: 'Dragging files from Explorer window and dropping them on FoxPro control (requires VFP9)'
    Google
    Advertise here!