Jump to content

Pensioner

Members
  • Content Count

    4
  • Joined

  • Last visited

Community Reputation

0 Neutral
  1. Pensioner

    Modifying the (Default) Value in registry

    Back again. As I stated previously i eventually, with help Kas, got this working. Having tried it now on at least 5 different laptops it does not work. It does modify the registry so the code works however it does not change the colour of the mouse cursor. Even after a reboot it still does not change. If I go into mouse settings it does indeed confirm that the changes where made. So I changed it back to white in Mouse Settings and then back to black again and the change is instant. So what else needs to be done in delphi code to actually apply the settings made?
  2. Pensioner

    Modifying the (Default) Value in registry

    Someone slap me senseless.....!!!!.... I finally found the problem. I should have done this earlier. I stepped through the code and found I was missing a very important line. Why Delphi didn't report it as an error I don't know. The line I was so stupidly missing was in Kas's code but I stupidly only copied his code between the Try and finally section. What a plonker!!! Maybe I'm getting too old for this now...lol Kas many thanks for your help... MyReg := TRegistry.Create;
  3. Pensioner

    Modifying the (Default) Value in registry

    Hi Kas. Many thanks for the response and code. Unfortunately it hasn't worked. Can't understand why this particular key is so hard to change.
  4. Pensioner

    Modifying the (Default) Value in registry

    Hi. New here so apologies if this is posted in the wrong place. I've been searching for over a week now for an answer to this problem but have yet to find one that works. I have a need to change the mouse settings quickly depending on which PC/Laptop I'm working on because I find it difficult to see a white small cursor on screens. I want to be able to change it to BLACK and a size of 2. The size I am able to change but the colour I can't. I'm running XE8 and compiling on 32bit platform. The code I'm trying is as follows... Try MyReg := TRegistry.Create; MyReg.RootKey := HKEY_CURRENT_USER; if not (MyReg.OpenKey('\Control Panel\Cursors',False)) then begin MyReg.OpenKey('\Control Panel\Cursors',True); // tried this and it fails MyReg.WriteString('(default)','Windows Black'); // Also tried this which also fails MyReg.WriteString('','Windows Black'); MyReg.WriteInteger('CursorBaseSize',48); end; Finally FreeAndNil(MyReg); End; I'm hoping my quest ends here... Thank you all in advance...
×