Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 195
  • Last Modified:

Question about GetSetting?

Can someone explain to me what this does? I know it has something to do with the registry.

m_strSaveDir = GetSetting(App.EXEName, "SaveSection", "SaveKey")

Is it assigning a value to the Windows registry?  I know it is being used somehow maybe with a common dialog box.  How do I delete whats in it.
0
InvisibleMan
Asked:
InvisibleMan
  • 3
1 Solution
 
gencrossCommented:
This sets a value to a registry key.

Run regedit.  Once you have the program running choose Edit/Find and search for the key that is in the GetSetting call.  When you find it you can delete it.

NOTE: Deleting a registry key could cause problems with the app that put it there.

0
 
hesCommented:
>>m_strSaveDir = GetSetting(App.EXEName, "SaveSection", "SaveKey")
This is retrieving a registry value from (in win 98)
HKEY_CURRENT_USER\Software\VB and VBA Program Settings\APP.ExeName\SaveSection

It was stored by a
SaveSetting(App.EXEName, "SaveSection", Value)

You can delete it but most programmers who use the GetSetting also look for not there and reset it to a default
 
0
 
gencrossCommented:
Sorry...Didn't look closely enough.  This does get the setting not save it.
0
 
InvisibleManAuthor Commented:
Thanks guys do you think because a dialog box is being used and some drive mappings that it is being used to set the path.  I know that it is actually saving a path to a text file.  For example, C:\Testing.txt.  So now everytime the code runs its pulling into m_strSaveDir that path.  Should I delete it or just default it to nothing?
0
 
gencrossCommented:
If you are not going to use the registry setting any further then delete it and get rid of the code that Gets/Sets it.  No need to do more than you have to.
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now