aewarnick Posted March 6, 2003 Posted March 6, 2003 All I can save so far is regular values in the registry using SetValue. How can I save DWord values? Quote C#
aewarnick Posted March 6, 2003 Author Posted March 6, 2003 (edited) Nevermind. You just save it as a number. All I need is how to get the integer equivalenes of these color values: fff9fbdd ffe7e8d0 ffbfe0f2 ffe7e8d0 ffd5e2ec Edited March 6, 2003 by aewarnick Quote C#
aewarnick Posted March 6, 2003 Author Posted March 6, 2003 Nevermind, the integer equivalent is too big. And even when I put it in my code like this: CommunicationLog.RegColors.SetValue("LogBoxColor", 0xffeeecd7); It still saves as a string and not a dword. I am stumped. Quote C#
aewarnick Posted March 6, 2003 Author Posted March 6, 2003 These are both red CommunicationLog.RegColors.SetValue("LogBoxColor", 0xffff0000); //TBLabelsColor CommunicationLog.RegColors.SetValue("TBLabelsColor", -65536); but the top is the one seen in the registry and it does not work in the code. I don't see any way to get that bottom number for unknown colors (unlike red). I don't see how those 2 numbers are alike because in the registry it says that 0xffff0000 is 4294901760 and not -65536. Can someone help? By the way, I am using the FromArgb methods to get the colors. Quote C#
aewarnick Posted March 6, 2003 Author Posted March 6, 2003 Here is how I ended up doing it: SetValue("LogBoxColor", ColorTranslator.FromHtml("#fff8f9d9").ToArgb()); Quote C#
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.