Disclaimer : provided code is experimental, never perfect, always incomplete, sometimes strange, perhaps wrong, and certainly perfectible ... but, fell free to get inspired and make it better ;-)
Delphi's ToggleSwitch component is not displaying well with the latest 2.0 High DPI styles, here's a manual fix
Sun Beach Cats & Delphi ;)
Lets code the affinity
Tweak the CPU affinity to avoid debugger freeze !