Retrieve from Registry... VB6.0

Posted on 2003-03-24
Medium Priority
Last Modified: 2007-12-19
How do you get all the registry values at one go and display them in a combo box?

i first store the values in the registry at the start of my program but in some parts of the program i would like to retrieve the values and display them in a combo box...
Question by:red_antz
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
LVL 53

Accepted Solution

Dhaest earned 180 total points
ID: 8200784
LVL 30

Expert Comment

by:Mayank S
ID: 8201826
See the code for the pre-defined About Dialog in VB.


Expert Comment

ID: 8201835
Could use combination of getsetting, GetAllSettings ,SaveSetting

GetSetting(appname, section, key[, default])

The GetSetting function syntax has these named arguments:

appname - String expression containing the name of the application or project whose key setting is requested.

section - String expression containing the name of the section where the key setting is found.

key -  String expression containing the name of the key setting to return

default (Optional) - Expression containing the value to return if no value is set in the key setting. If omitted, default is assumed to be a zero-length string ("").


txtPayment.Text = GetSetting(App.EXEName, "Print_Settings", "Payment", "600")

The App object is a global object accessed with the App keyword. It determines or specifies information about the application's title, version information, the path and name of its executable file and Help files, and whether or not a previous instance of the application is running.

EXEName Property  

Returns the root name of the executable file (without the extension) that is currently running. If running in the development environment, returns the name of the project.

Hope this helps you in the right direction

Optimize your web performance

What's in the eBook?
- Full list of reasons for poor performance
- Ultimate measures to speed things up
- Primary web monitoring types
- KPIs you should be monitoring in order to increase your ROI


Expert Comment

ID: 8244301
Private Declare Function RegOpenKeyEx Lib "advapi32" Alias "RegOpenKeyExA" (ByVal hKey As Long, ByVal lpSubKey As String, ByVal ulOptions As Long, ByVal samDesired As Long, phkResult As Long) As Long
Private Declare Function RegCloseKey Lib "advapi32" (ByVal hKey As Long) As Long
Private Declare Function RegQueryValueEx Lib "advapi32" Alias "RegQueryValueExA" (ByVal hKey As Long, ByVal lpValueName As String, ByVal lpReserved As Long, ByRef lpType As Long, ByVal szData As String, ByRef lpcbData As Long) As Long
Private Declare Function RegSetValueEx Lib "advapi32.dll" Alias "RegSetValueExA" (ByVal hKey As Long, ByVal lpValueName As String, ByVal Reserved As Long, ByVal dwType As Long, ByVal lpData As Any, ByVal cbData As Long) As Long         ' Note that if you declare the lpData parameter as String, you must pass it By Value.

API calls in windows

Expert Comment

ID: 9474496
This old question needs to be finalized -- accept an answer, split points, or get a refund.  For information on your options, please click here-> http:/help/closing.jsp#1 
Post your closing recommendations!  No comment means you don't care.
LVL 53

Expert Comment

ID: 9474532
My recommandation: answered by dhaest

Expert Comment

ID: 9474871
can't say I agree you answered his question but then I did not check your links!


Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Having just graduated from college and entered the workforce, I don’t find myself always using the tools and programs I grew accustomed to over the past four years. However, there is one program I continually find myself reverting back to…R.   So …
This article will show, step by step, how to integrate R code into a R Sweave document
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.
The viewer will be introduced to the member functions push_back and pop_back of the vector class. The video will teach the difference between the two as well as how to use each one along with its functionality.
Suggested Courses

752 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question