Using Win32 functions in Visual FoxPro Image Gallery
Code examples:
Winsock: connecting to a news server (NNTP, port 119)
Winsock: retrieving Web pages using sockets (HTTP, port 80)
How to adjust monitor brightness (Vista, monitor with DDC support)
How to copy the image of a form to the Clipboard using Bitmap API functions
Creating an Open dialog box to specify the drive, directory, and name of a file to open (Shell32 version)
Creating the Open dialog box to specify the drive, directory, and name of a file to open
How to ping a remote site using IP Helper API calls
Retrieving local computer and user names
The original LoadPicture() function in VFP returns valid handles to bitmaps, icons, cursors, and metafiles
Dragging files from Explorer window and dropping them on FoxPro control (requires VFP9)
Extended MessageBox Class
How to extract frames from AVI files
How to disable the Windows Clipboard (VFP9)
Loading a string resource from an executable file
Retrieving list of files on the FTP directory
Converting command-line string to a set of Unicode argument strings (WinNT only)
How to block the PrintScreen key
How to view icons stored in executable files (Icon Viewer)
WAV file player
Creating a mailslot
How to retrieve the number of print jobs queued for the printer
Transparent Menu Class (requires VFP9)
Adding an ODBC data source with the SQLConfigDataSource; use automatic or interactive mode
Reading and setting the priority class values for the current process and thread
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
 
  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:
  • ~
8250 bytes  
Created: 2004-10-18 19:25:31  
Modified: 2011-12-10 09:20:22  
Visits in 7 days: 122  
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-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 (23.20.196.179)
2.88 hrs.Example: 'Using the DrawText function'
3.47 hrs.Example: 'How to download a file from HTTP server using URL Monikers functions'
 Function: 'GetPwrCapabilities'
Function group: 'Power Management'
3.86 hrs.Example: 'How to check whether the system is 32-bit or 64-bit'
4 hrs.Function: 'MAPIReadMail'
 Function: 'FindClose'
Function group: 'File Management'
10.21 hrs.Function: 'GetMenuItemInfo'
Function group: 'Menu'
 Example: 'Enumerating files opened on the network'
10.34 hrs.Example: 'Disabling drawing in the VFP form'
10.67 hrs.
Function group: 'String'
Google
Advertise here!