|
-
Feb 2nd, 2005, 12:36 AM
#1
Thread Starter
New Member
Storing data in Registry
Hi,
I want to store and retrieve the content of a listbox in registry. Now i am storing the content in a flat file and retrieving it. How to make use of the registry.
-
Feb 2nd, 2005, 12:49 AM
#2
Re: Storing data in Registry
Why use the registry? That method was OK in the past, but now too many programs are filling up the registry with bloat. You'd do better keeping the flatfile, or using an INI file. Any reason for the change?
-
Feb 2nd, 2005, 01:07 AM
#3
Re: Storing data in Registry
The easiest way to save data to the registry is with GetSetting and SaveSetting.
Is the reason for the change security?
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum. 
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it! 
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6 
-
Feb 2nd, 2005, 02:14 AM
#4
Re: Storing data in Registry
It's easier to encrypt the flat file. That is 100% more secure.
-
Feb 7th, 2005, 07:08 AM
#5
Thread Starter
New Member
Re: Storing data in Registry
I am going to distribute my application as an exe. In my application i will get some files which is to be displayed(say some wav files). Now i am creating a flat file in the application path and storing the details and retrieving it, which i dont want to expose to user. So i need to store it in registry and retrive it. could you plz suggest some codes to store and retrieve from registry
-
Feb 7th, 2005, 11:45 AM
#6
Re: Storing data in Registry
You could you the GetSetting and SaveSetting methods to write to the registry.
They write to "HKEY_CURRENT_USER\Software\VB and VBA Program Settings".
VB Code:
SaveSetting App.Title, "Settings", "WavInfo", "C:\MyWav.wav"
'Then to retrieve:
'If you specify a value for the Default parameter, if no value is found it will use the parameter you specified
GetSetting App.Title, "Settings", "WavInfo", "C:\Default.wav"
HTH
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum. 
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it! 
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6 
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
|