Registry

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi
I am new to thi
I am trying to to read and write values to the registry and I am having no luck with this
What I am hopeing to do is, using the colordialogbox, to have the user select a color and have that color be set as the form's background color as soon as the user click the ok button in the colorDiabox
I have tried using the examples in Vb.net help, but try as I might, I am getting all kinds of errors at startu
Can some one show me a simple way to read/write to the registry and then assign that variable to a color (color.variable) that works
much thanks
 
Here!

Dim Key As Microsoft.Win32.RegistryKey

Key =
Microsoft.Win32.Registry.CurrentUser.OpenSubKey("Software\\COMPANYNAME\\APPL
ICATION", True)

Key.SetValue("dbpath", dbPath)

Key.Close()

/Lars

Joe said:
Hi
I am new to this
I am trying to to read and write values to the registry and I am having no luck with this.
What I am hopeing to do is, using the colordialogbox, to have the user
select a color and have that color be set as the form's background color as
soon as the user click the ok button in the colorDiabox.
I have tried using the examples in Vb.net help, but try as I might, I am
getting all kinds of errors at startup
Can some one show me a simple way to read/write to the registry and then
assign that variable to a color (color.variable) that works.
 
Lars,
Key =
Microsoft.Win32.Registry.CurrentUser.OpenSubKey("Software\\COMPANYNAME\\APPL
ICATION", True)

You don't need to escape backslashes in VB.NET.



Mattias
 
Mattias,

* Mattias Sjögren said:
You don't need to escape backslashes in VB.NET.

I have never tested it, but does it still work with "\\" instead of "\"?
 
Back
Top