473,386 Members | 1,795 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,386 software developers and data experts.

Saving to the registry

How do I save a string (taken from a text box) to a multi string registry
key? At the moment when I save a string it turns the Multi string reg entry
into a string Key entry!

--
Cheers
Ithaqua
Nov 21 '05 #1
3 1221
"Ithaqua" <It*****@discussions.microsoft.com> schrieb:
How do I save a string (taken from a text box) to a multi string registry
key? At the moment when I save a string it turns the Multi string reg
entry
into a string Key entry!

You can try to pass an array of null-terminated strings to 'SetValue' in
order to write a 'multi_sz' value.

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>

Nov 21 '05 #2
If you retrieve the data from the textbox's .Text property it's returned
as a single string and that's what it's creating a string key entry.

If you pass the SetValue an array of strings it will create a
multi-string entry for you. So if it's that important for you to have a
multi-string entry you'll have to parse your string into a string array.

Hope this helps,
Brian Swanson

"Ithaqua" <It*****@discussions.microsoft.com> wrote in message
news:It*****@discussions.microsoft.com:
How do I save a string (taken from a text box) to a multi string registry

key? At the moment when I save a string it turns the Multi string reg
entry
into a string Key entry!

--
Cheers
Ithaqua


Nov 21 '05 #3
Could I have a example of of this please?
Thanks
Ithaqua

"Herfried K. Wagner [MVP]" wrote:
"Ithaqua" <It*****@discussions.microsoft.com> schrieb:
How do I save a string (taken from a text box) to a multi string registry
key? At the moment when I save a string it turns the Multi string reg
entry
into a string Key entry!

You can try to pass an array of null-terminated strings to 'SetValue' in
order to write a 'multi_sz' value.

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>

Nov 21 '05 #4

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

Similar topics

138
by: theodp | last post by:
--> From http://www.techdirt.com/articles/20040406/1349225.shtml Microsoft Patents Saving The Name Of A Game Contributed by Mike on Tuesday, April 6th, 2004 @ 01:49PM from the...
4
by: Amitabh Deepak | last post by:
Is there any way to check whether daylight saving is enabled on a linux machine?
3
by: Ed P. | last post by:
Hello...I currently have a OpenFileDialog object that I will use to get the path of an Access Database. I would like to save the path of the database (ie c:\MyDatabase.mdb) to the registry so that I...
3
by: Ed P. | last post by:
I am trying to save a location to a database using the registry...I've been successful in this, but is there another way I can save this. I have searched on the net and have found that saving the...
16
by: Larry Woods | last post by:
I need to persist user selections. I know that I can use the Registry, but I was hoping that there was some sort of "text based" solution. TIA, Larry Woods
4
by: Amjad | last post by:
Hi, I'm trying to create dynamic default values in TextBoxes that reflect the last user's input value. How can I save the user's input in a textbox control so that the user can see his last...
15
by: Dan DeConinck | last post by:
Hello, I want to save the position of all the controls on my form. I would like to write them out to a preference file. I have done this in DOS BASIC like this: TO WRITE the preference...
4
by: Husam | last post by:
Hi EveryBody: Is there any way to save my text file in Registry Key instaed of saving it in Drive C: or any other drive drive ? any help will be appreciated regard's Husam
4
by: Martin the Third | last post by:
Okay, I have a program that has many optional windows. Its not mdi or anything, it just has alot of windows that you can choose to have that would add extra features to the program. Now, I need...
2
by: desertavataraz | last post by:
I am trying to save the background color of my main textbox so that if a user changes it, those changes will be automatically save and retreived when the user re-opens the application. The code...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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
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
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
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...

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.