473,406 Members | 2,705 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.

Registry Help Needed

Hi All

I am writing a small app that enumerates a certain registry key & then adds
the key values to a listbox

When I select one in the listbox & click the delete button I want to delete
that item from the registry

Example:

Some Key In Registry:

SubKey1 Value = "Hello"
SubKey2 Value = "Bye"
SubKey3 Value = "Cheap"
SubKey4 Value = "Expensive"
SubKey5 Value = "LOL"

So, the values Hello, Bye, Cheap, Expensive & LOL are shown in the lisbox,
but I cannot delete a key according to that value as it don't exist. So, if
I clicked on CHEAP how do I delete the entire SubKey3 from the registry?

Any help would be wonderful

TIA
Apr 16 '06 #1
1 1165
Jonny wrote:
Hi All

I am writing a small app that enumerates a certain registry key & then adds
the key values to a listbox

When I select one in the listbox & click the delete button I want to delete
that item from the registry

Example:

Some Key In Registry:

SubKey1 Value = "Hello"
SubKey2 Value = "Bye"
SubKey3 Value = "Cheap"
SubKey4 Value = "Expensive"
SubKey5 Value = "LOL"

So, the values Hello, Bye, Cheap, Expensive & LOL are shown in the lisbox,
but I cannot delete a key according to that value as it don't exist. So, if
I clicked on CHEAP how do I delete the entire SubKey3 from the registry?

Any help would be wonderful

TIA

You need to hold a reference to SubKey3 in the list of values. You have
a display member ( Cheap ) and a value member ( SubKey3 ), but you'll
have to bind the listbox to a table or arraylist or some such thing.
Then when Cheap is selected for deletion, you can then delete SubKey3.

Tom
Apr 17 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: firenet | last post by:
Came in one morning and found that the following message appeared only on running Access 2000, then the program shuts down, all other office 2000 applications work fine. "Required registry...
4
by: akhare1 | last post by:
OK, before I start, let me clarify a few things here. This is not the run of the mill failure to read a registry key while trying to write to the Event Log. Here's our setup: a) IIS 6.0...
4
by: Cal | last post by:
The Help examples for creating a Registry subkey uses double backslashes between subkeys. The examples for creating a folder use a single backslash. First: Am I right in that double...
8
by: Al Kaufman | last post by:
I have a simple console app that uses: regSubKey = <some registry key> Dim reg As RegistryKey = Registry.ClassesRoot.OpenSubKey(regSubKey) Dim path As String path = CStr(reg.GetValue(""))
11
by: Larry Bird | last post by:
I'm trying to read a registry key using VB.Net. I have posted the code below that I'm using: Dim DBConnect As RegistryKey = Registry.CurrentUser.OpenSubKey _ ("Software\VB and VBA Program...
7
by: Austin Myers | last post by:
I don't think I can do what I wanted initially, setting a registry keys permissions via code and grant user permission. So, can anyone tell me, is there a place in the registry where people...
6
by: ewolfman | last post by:
Hi, Is there any way in which I can monitor / hook the Registry, and upon a call to a specific key from a specific application - swap the returned value? I was thinking of using this method...
6
by: JOSII | last post by:
Getting a string of boolean value into and out of the registry is no problem. Here's the problem: Although you can place an object into the registry and retreive it, I need to place an ArrayList...
1
by: projectVBA | last post by:
Hi , I wrote some add in for PowerPoint and i'm trying to find an automatic way to load it every time PowerPoint starts. I found Microsoft Code example (see below ) BUT the problem is : I can't...
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
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
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
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
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.