-
August 9th, 2010, 06:14 PM
#16
Re: How do I programmatically change Windows Themes in XP?
I'd start a new thread, rather than bring up an old one. Not related, really.
-
August 10th, 2010, 05:50 AM
#17
Re: How do I programmatically change Windows Themes in XP?
I have one more question. Why do we use .msstyles and not .theme files?
-
August 10th, 2010, 09:03 AM
#18
Re: How do I programmatically change Windows Themes in XP?
Originally Posted by farrukh_javeid
Thanks for the quick response .
I need to ask if you have used the function Registry.SetValue()? If yes, in what shape the parameters might be.
Sorry, I am new to visual basic .net
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
-
August 12th, 2010, 09:19 AM
#19
Re: How do I programmatically change Windows Themes in XP?
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.
-
August 12th, 2010, 09:22 AM
#20
Re: How do I programmatically change Windows Themes in XP?
Originally Posted by farrukh_javeid
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.
No idea...sorry. As someone else suggested you might want to jsut start a new thread for that.
-
August 12th, 2010, 09:29 AM
#21
Re: How do I programmatically change Windows Themes in XP?
Thanks for the help though. Ive already created a thread and just waiting for the help.
You're posts have been real helpful.
Regards,
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|