The easiest and best way to write/read application data in VB6 (compare Registry, database and configuration file)
Posted by Admin L in VB6 Programming on 30-08-2011. Tags: VB6 Programming Experience
Author: Nosa Lee
Original Address: https://www.seeksunslowly.com/vb6-write-read-application-data
To reprint this article, please indicate the source, thank you.
_____________________________________
This method has a premise: the application data is not complicated, usually is some simple configuration.
The easiest and best way: use SaveSetting and GetSetting functions that provide by VB6 directly, please read MSDN or refer to Object Browser to know more detail.
This way saves your data at HKEY_CURRENT_USER\Software\VB and VBA Program Settings in Registry.
Advantages: don’t need to declare Win32 API to accesss Registry; don’t need to use the support files for specific database, no learning costs; saves data in HKEY_CURRENT_USER Registry path, no UAC prompts in Vista and Windows 7; don’t need to write file in Program folder and system drive, no UAC prompts in Vista and Windows 7. So, it is the easiest and best compatible for every Windows version, if there is no special requirement, strongly recommended you use it.
It’s awlyas a pleasure to hear from someone with expertise.