I'd start a new thread, rather than bring up an old one. Not related, really.
Printable View
I'd start a new thread, rather than bring up an old one. Not related, really.
I have one more question. Why do we use .msstyles and not .theme files?
Here's my WriteRegistryValue function:
Code:
''' <summary>
''' Writes a value to the registry.
''' </summary>
''' <param name="MainKey">Main key to reach as a registry key such as Registry.CurrentUser.</param>
''' <param name="Subkey">String of the subkey to read.</param>
''' <param name="KeyToWrite">String of the key to write to.</param>
''' <param name="KeyValue">Value to write.</param>
''' <param name="KeyType">Optional - Type of value being passed as a RegistryValueKind. If not specified will assume a string value.</param>
''' <remarks></remarks>
Friend Sub WriteRegistryValue(ByVal MainKey As RegistryKey, ByVal SubKey As String, ByVal KeyToWrite As String, ByVal KeyValue As String, Optional ByVal KeyType As RegistryValueKind = RegistryValueKind.String)
Dim rk As RegistryKey = MainKey.CreateSubKey(SubKey)
Try
rk.SetValue(KeyToWrite, KeyValue, KeyType)
rk.Close()
Catch ex As Security.SecurityException
MsgBox("Unable to write to the registry! You may not have high enough security for registery access." & vbLf & "Key: " & MainKey.ToString & SubKey & vbLf & "Key Name: " & KeyToWrite & vbLf & "Value: " & KeyValue, MsgBoxStyle.OkOnly, "Registry Error")
Debug.WriteLine(ex.Message)
Catch ex As Exception
Debug.WriteLine(ex.Message)
End Try
End Sub
Thank you that was a great help but I want to use .theme files as well in my project. Can you guide me how to accomplish this.
Thanks in advance.
Thanks for the help though. Ive already created a thread and just waiting for the help.
You're posts have been real helpful.
Regards,