ribbons.jpg (41.9K)
Number of downloads: 4
The actual utility:
scr.exe (8K)
Number of downloads: 3 (no source yet -its embarrassing bad)
Heres the problem. the utility works perfectly if you already have the settings in the registry but if the keys dont exist before you run it, it crashes
keys required for it to run properly:
ribbons.reg (476bytes)
Number of downloads: 2
heres the code clipping of where i get the data from the registry
RegistryKey RibbonsKey = Registry.CurrentUser;
RibbonsKey = RibbonsKey.OpenSubKey("Software\\Microsoft\\Windows\\CurrentVersion\\Screensavers\\Ribbons", true);
RibbonWidth = (int) RibbonsKey.GetValue("RibbonWidth");
Console.WriteLine("RibbonWidth = " + RibbonWidth);
as far as i can tell its failing at line 3 in that code when it tries to ready the data inside a nonexistent key. how can i make it ignore the error or restructure the code to prevent it.
Unhandled Exception: System.NullReferenceException: Object reference not set to an instance of an object. at ScrForm..ctor() at Test.Main()
also, can I get a decent IDE for free? (no warez) textpad + command line is getting tiresome.
P.S. I know TweakVista can already do this. I refuse to pay for a skinned regtweaker. Plus this is good way to learn (I hate making useless 'Hello World' apps)



Help
Back to top










