|
-
Apr 12th, 2006, 08:43 PM
#1
Thread Starter
Fanatic Member
[2005] Accessing the Registry
Does vb.net provide any easy ways to determine values from the registry?
Thanks.
-
Apr 12th, 2006, 09:20 PM
#2
Re: [2005] Accessing the Registry
There's the Microsoft.Win32.Registry and .RegistryKey classes provided in the Framework. VB 2005 also provides the My.Computer.Registry object that has a property that corresponds to each registry hive and these are Microsoft.Win32.Registry objects.
-
Apr 13th, 2006, 04:56 AM
#3
Frenzied Member
Re: [2005] Accessing the Registry
check for savesetting and getsetting method, i think this is the fastest way to store values and retrieves them in and out of the regestry.
i usually use them to save the last user adjustemnt of the forms. (height, width and position)
-
Apr 13th, 2006, 05:03 AM
#4
Re: [2005] Accessing the Registry
SaveSetting and GetSetting should be avoided these days. They are not for general registry access. They access values under a VB- and application-specific key in the HKCU hive. They cannot access keys outside that specific area.
The SaveSetting function adds the key to HKEY_CURRENT_USER\Software\VB and VBA Program Settings.
.NET 2.0 has user-scoped settings to do what SaveSetting and GetSetting used to. Settings use the application config file, which is one of the recommended places for .NET apps to strore application data. It is recommended that the registry be avoided if possible by .NET apps as Microsoft is trying to reduce applications dependence on it. The registry has grown out of control and is a perfromance bottleneck on many systems, so if Microsoft can wean developers off using it it will at least prevent greater stress, if not relieve some of that which currently exists.
-
Apr 13th, 2006, 05:21 AM
#5
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|