473,406 Members | 2,619 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

Two problems

Hi i want to know how to talk to the register so i can find out a value of the windows produt name in VB6.

My other problem is that for some reason the system info in the about box does not seem to work i always get system unavaliable at this time. I have looked in the code and it is a manual error so i havn't got a clue why it is comming up.

Can annyone hel;p cheers
Nov 13 '07 #1
5 1124
debasisdas
8,127 Expert 4TB
Try to use Savesettings,getsettings,deletesetings for handling the registry.
Nov 13 '07 #2
AHMEDYO
112 100+
u can use savesetting and deletesetting but i think as i remmember it only will work with ur application setting not all keys in registery, if u wanna work with registry and do what u want u must use API function

all registry functions start by "Reg" as RegOpenKey, RegCloseKey, RegQueryvalueEx and so on, if u not ordinary work with API u must read about it or u can get external component and i have file that work with registry i was made it before and if u wanna it email me [ mail id removed ]
Nov 15 '07 #3
AHMEDYO
112 100+
Try to use Savesettings,getsettings,deletesetings for handling the registry.
sry about my mail id , i didnt mean anything except help and this is my first time use forums, sry again
Nov 15 '07 #4
u can use savesetting and deletesetting but i think as i remmember it only will work with ur application setting not all keys in registery, if u wanna work with registry and do what u want u must use API function

all registry functions start by "Reg" as RegOpenKey, RegCloseKey, RegQueryvalueEx and so on, if u not ordinary work with API u must read about it or u can get external component and i have file that work with registry i was made it before and if u wanna it email me [ mail id removed ]
Hi there ,

Can you please help.

Infact I am trying to read registry keys but unable to do so. I obtained a sample code from the net, however the program is not able to read the registry keys.

Error msg obtained :"Run MRU list not found"

however there are values for the key MRUList in the registry.

Program is as follows:
Expand|Select|Wrap|Line Numbers
  1. Public Sub ShowRunMRU()
  2.  
  3.    Dim iCtr As Integer
  4.    Dim hKey As Long
  5.    Dim nValues As Long, lValueData As Long
  6.    Dim lData As Long
  7.    Dim sPath As String
  8.    Dim sList As String
  9.    Dim sMsg As String
  10.    Dim sData As String
  11.    Dim sName As String
  12.    Dim ft As FILETIME
  13.  
  14.  
  15.    sPath = "Software\Microsoft\Windows\CurrentVersion\Explorer\RunMRU"
  16.  
  17.    ' Open registry key
  18.    RegOpenKeyEx HKEY_CURRENT_USER, sPath, 0, KEY_READ, hKey
  19.  
  20.  
  21.  
  22.    ' Collect information on key's values
  23.    If RegQueryInfoKey(hKey, "", 0, 0, 0, 0, 0, nValues, 0, lValueData, _
  24.                       0, ft) <> ERROR_SUCCESS Then
  25.       sMsg = "Run MRU list not found"
  26.    Else
  27.       ' initialize data buffer
  28.       lData = lValueData + 1
  29.       sData = Space(lData)
  30.       ' Retrieve MRUList Value
  31.       If RegQueryValueEx(hKey, "MRUList", 0, 0, ByVal sData, lData) <> ERROR_SUCCESS Then
  32.          sMsg = "Run MRU list not found"
  33.       Else
  34.          ' Trim MRU list data
  35.          sList = Left(sData, lData - 1)
  36.  
  37.          For iCtr = 1 To Len(sList)
  38.             ' Get value name
  39.             sName = Mid(sList, iCtr, 1)
  40.             ' Reinitialize buffer on each iteration
  41.             lData = lValueData + 1
  42.             sData = Space(lData)
  43.  
  44.             ' Get data
  45.             RegQueryValueEx hKey, sName, 0, 0, ByVal sData, lData
  46.  
  47.             ' Trim string data
  48.             sData = Left(sData, lData - 1)
  49.  
  50.             sMsg = sMsg & sData & vbCrLf
  51.          Next
  52.       End If
  53.  
  54.       RegCloseKey hKey
  55.  
  56.    End If
  57.  
  58.    ' Display MRU list
  59.    MsgBox sMsg, vbOKOnly, "Run MRU List"
  60.  
  61. End Sub
Feb 16 '08 #5
Killer42
8,435 Expert 8TB
sry about my mail id , i didnt mean anything except help and this is my first time use forums, sry again
It's not a major problem. We disallow posting of e-mail addresses ffor your own protection. There are scammers and spammers out there who scan forums like this to harvest addresses.
Feb 18 '08 #6

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: Jerome Lefebvre | last post by:
Hello, Hope this will interest a few. I been working with a friend on the problems given out during the "International Collegiate Programming Contest" (ICPC) http://icpc.baylor.edu/icpc/ ....
14
by: Jim Hubbard | last post by:
Are you up to speed on the difficulties in using the 1.1 .Net framework? Not if you are unaware of the 1,596 issues listed at KBAlertz (http://www.kbalertz.com/technology_3.aspx). If you are...
1
by: 3f | last post by:
Hello; We have made a web application that people can download from our web site and installed on: Windows XP Windows 2000 Professional Windows 2003 Server Windows 2000 Server
5
by: Corky | last post by:
This works: db2 SELECT DISTINCT PROBLEM_OBJECTS.PROBLEM_ID FROM PROBLEM_OBJECTS INNER JOIN PROBLEMS ON PROBLEM_OBJECTS.PROBLEM_ID = PROBLEMS.PROBLEM_ID WHERE INTEGER(DAYS(CURRENT DATE) -...
2
by: Ellen Graves | last post by:
I am having a lot of problems with DB2 8.3.1 on RH Linux AS2.1. Installing and running stored procedures is problematic. Stored procedures I have used for years on V7 on WinNT are now failing...
19
by: Jim | last post by:
I have spent the past few weeks designing a database for my company. The problem is I have started running into what I believe are stack overflow problems. There are two tab controls on the form...
10
by: BBFrost | last post by:
We just recently moved one of our major c# apps from VS Net 2002 to VS Net 2003. At first things were looking ok, now problems are starting to appear. So far ... (1) ...
19
by: Dales | last post by:
I have a custom control that builds what we refer to as "Formlets" around some content in a page. These are basically content "wrapper" sections that are tables that have a colored header and...
2
by: Brian | last post by:
NOTE ALSO POSTED IN microsoft.public.dotnet.framework.aspnet.buildingcontrols I have solved most of my Server Control Collection property issues. I wrote an HTML page that describes all of the...
0
by: Sergistm | last post by:
Hello World, :D I have a problem that it is making me crazy, I hope you can help me. I'm trying to execute a .exe file with the Procces.Start, and there is no problem when the file is on my...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.