Windows Mobile Registry Code

I think I got most of what needed at this site: 

http://msdn.microsoft.com/en-us/library/cy6azwf7(VS.80).aspx.  Here’s the code:

 

I defined the information for the key in section right after the form is defined:

 

Public Class Form1

Const userRoot As String = "HKEY_LOCAL_MACHINE"
Const subkey As String = "Software\KWeaver\InfusionSetHelper"
Const keyName As String = userRoot & "\" & subkey

 

To set a key value I used:

Registry.SetValue(keyName, "TDD", txtTDD.Text)

 

To retrieve a key value I used:

 

Me.txtTotal.Text = Registry.GetValue(keyName, "Total", Nothing)
Me.txtTDD.Text = Registry.GetValue(keyName, "TDD", Nothing)

 

To delete a key value I used:

 

Registry.CurrentUser.DeleteSubKey(keyName & "/Total")