VB.NET Registry Operations
A central hierarchical database used in Microsoft Windows Operating System to store information that is necessary to configure the system for one or more users, applications and hardware devices.
The Registry comprises a number of logical sections called Hives. The following are the predefined keys that are used by the system.
HKEY_CURRENT_USER HKEY_USERS HKEY_LOCAL_MACHINE HKEY_CLASSES_ROOT
Each key has many subkeys and may have a value.
When programming with VB.NET, you can choose to access the registry via either the functions provided by VB.NET or the registry classes of the .NET Framework. Registry entries contain two parts: the value name and the value.
Creating a Registry Entry
rKey = Registry.LocalMachine.OpenSubKey("SOFTWARE", True)
Above code shows how to create a subkey under HKLM\Software called AppReg.
Writing values to Registry
Above code shows how to set values to registry entry AppReg.
The following VB.NET program shows how to create a registry entry , set values to registry , retrieve values from registry and delete keys on Registry.Drag and drop four buttons on the form control and copy and paste the following source code.
- What is Microsoft .Net Framework
- what are the functions of microsoft .net framework?
- Common Language Runtime in .Net Framework
- How to Common Language Runtime
- What is .Net Framework Class Library
- What is Common Language Specification
- What is Common Type System
- What is Microsoft Intermediate Language
- What is Portable Executable (PE) File Format
- What is Microsoft Just In Time Compiler
- How to Managed Code - Microsoft .Net Framework
- What is .Net Framework Metadata
- what is .Net Framework Assembly
- What is Assembly Manifest
- What is Global Assembly Cache
- What is a .Net Satellite Assembly?
- What are the contents of an Assembly?
- How to Private Assembly and Shared Assembly
- What is Microsoft .Net Strong Name
- What is .Net Namespaces
- What is Application Domain
- What is Code Access Security
- What is Garbage Collection
- .Net Threads