VS03 and VS05 registry editing
-
i'm writing a small app to change the windows mouse in VS'05, to change a key i do this: Imports Microsoft.Win32 . .. Dim key as RegistryKey = Registry.CurrentUser.OpenSubKey("Control Panel\\Cursors",True) key.SetValue("Arrow","%SYSTEMROOT%\NewCursor.cur",RegistryValueKind.ExpandString) i would like to do this same thing in VS'03, but it does not facilitate the last parameter where i use the RegistryValueKind class (or enum, whatever it is). does anyone know the vb03 equivalent to the line: key.SetValue("Arrow","%SYSTEMROOT%\NewCursor.cur",RegistryValueKind.ExpandString) ?
-
i'm writing a small app to change the windows mouse in VS'05, to change a key i do this: Imports Microsoft.Win32 . .. Dim key as RegistryKey = Registry.CurrentUser.OpenSubKey("Control Panel\\Cursors",True) key.SetValue("Arrow","%SYSTEMROOT%\NewCursor.cur",RegistryValueKind.ExpandString) i would like to do this same thing in VS'03, but it does not facilitate the last parameter where i use the RegistryValueKind class (or enum, whatever it is). does anyone know the vb03 equivalent to the line: key.SetValue("Arrow","%SYSTEMROOT%\NewCursor.cur",RegistryValueKind.ExpandString) ?
From the MSDN Gospel: Note: When setting a value, the way in which the value being passed is stored in the registry is interpreted. There is no way to control whether the information being passed is stored as an sz, or an expanded_sz string, and therefore, all string values are interpreted as standard sz values. If the
.SetValue
method call will not set the value properly, then you'll have to P/Invoke the Registry API calls yourself to do it correctly. Check out http://www.pinvoke.net[^] for more information. RageInTheMachine9532 "...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome -
From the MSDN Gospel: Note: When setting a value, the way in which the value being passed is stored in the registry is interpreted. There is no way to control whether the information being passed is stored as an sz, or an expanded_sz string, and therefore, all string values are interpreted as standard sz values. If the
.SetValue
method call will not set the value properly, then you'll have to P/Invoke the Registry API calls yourself to do it correctly. Check out http://www.pinvoke.net[^] for more information. RageInTheMachine9532 "...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnomewell it would seem that the the site you gave me only lists API functions that retrieve the datatype, not change it. am i wrong?