Status: Release/Final
Language: Visual Basic .NET
Downloads: 264
Microsoft says:
Note: This function is provided only for compatibility with 16-bit applications written for Windows. Applications should store initialization information in the registry.
-GetPrivateProfileString, MSDN Library (Jan 2006)
WRONG! Applications shouldn't store their settings in the registry. It centralizes application-specific data, making the reinstallation, copying, and settings tweaking of applications more cumbersome. For all of my programs, I use these "Windows 3.1 compatibility" functions to read/write settings to a .ini configuration file that can be placed in the directory with a program. They're actually far easier to use than the registry, too, and with minimal drawbacks. Over the years, I've been refining these functions with a wrapper module that makes accessing application settings even easier, which you can download here. It includes the following members:
...
Microsoft says:
Note: This function is provided only for compatibility with 16-bit applications written for Windows. Applications should store initialization information in the registry.
-GetPrivateProfileString, MSDN Library (Jan 2006)
WRONG! Applications shouldn't store their settings in the registry. It centralizes application-specific data, making the reinstallation, copying, and settings tweaking of applications more cumbersome. For all of my programs, I use these "Windows 3.1 compatibility" functions to read/write settings to a .ini configuration file that can be placed in the directory with a program. They're actually far easier to use than the registry, too, and with minimal drawbacks. Over the years, I've been refining these functions with a wrapper module that makes accessing application settings even easier, which you can download here. It includes the following members:
- ConfigFile
- Class KeyPair
- Function Backup()
- Function Clear()
- Function ClearKey()
- Function ClearSection()
- Function DeleteSection()
- Function ReadFloatKey()
- Function ReadIntKey()
- Function ReadSection()
- Function ReadSectionNames()
- Function ReadStringKey()
- Function RestoreBackup()
- Function WriteKey()
- Function WriteSection()
1.2.2:
fixed a bug with backups without a path passed failing to backup
VB.Net Config File Module | 264 Downloads |
|
Download |
|
|