Guest McCune Posted January 28, 2006 Report Posted January 28, 2006 I'm pretty new to developing programs for PocketPC's, but I really would like to create my own little program :) I already have Visual Studio 5 and Windows Mobile 5.0 SDK. What I would like to do is select an option in my program. When selected it should change a register value. For example: ==== Choose one of the following options: CAPS indicator of the keyboard? |O| On |O| Off Save - Cancel === This is a small example of what I would like to do. What the program does behind the scenes is very simple actually: When selected ‘yes’ it should change the register value to: \HKCU\ControlPanel\Keyb\EnableIndicator -> DWORD ‘1’. When selected ‘no’ it should change the register value to: \HKCU\ControlPanel\Keyb\EnableIndicator -> DWORD ‘0’. When you press ‘Cancel’ I want to undo all changes. When ‘Save’ is pressed, it should save all selected items and exit the program. I think when I know how to do one item it’s not to hard to add more after that. Hope anyone can help me with this one! :D
Guest its_millertime22 Posted February 21, 2006 Report Posted February 21, 2006 First of all I hope you mean Visual Studio 2005... The code is very simple in C#: Code for YES: RegistryKey OurKey = Registry.CurrentUser; // Create OurKey set to HKEY_CU OurKey = OurKey.CreateSubKey(@"ControlPanel\Keyb", true); // Set it to the correct key in the registry OurKey.SetValue("EnableIndicator", 1, RegistryValueKind.DWord); //Write orOverwrite the DWORD value Code for NO: RegistryKey OurKey = Registry.CurrentUser; // Create OurKey set to HKEY_CU OurKey = OurKey.CreateSubKey(@"ControlPanel\Keyb", true); // Set it to the correct key in the registry OurKey.SetValue("EnableIndicator", 0, RegistryValueKind.DWord); //Write orOverwrite the DWORD value When selected ‘yes’ it should change the register value to: \HKCU\ControlPanel\Keyb\EnableIndicator -> DWORD ‘1’. When selected ‘no’ it should change the register value to: \HKCU\ControlPanel\Keyb\EnableIndicator -> DWORD ‘0’. <{POST_SNAPBACK}>
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now