Ok, I created a program that refreshes the screen, using the Night Mode code. If you run it after pickel, you can see the image.
There's no exception handling and parameters checking, so use at your own risk.
Now the question is: why my program works and refresh in Night Mode not?