Changing the primary display on Windows by code is easy... right?
I have this issue where Windows is sometimes randomly changing my primary display after a system restart. So I wanted to create a simple command-line application that would allow me to change the display settings on system startup - should be easy, r...
blog.lohr.dev4 min read
Hello,
thanks for the writing. I had really similar struggles with the same topic doing it in python (pywin32).
I also came to the same solutions, but there is still one unsolved thing for me and it would be really nice if you have an answer for this.
All works fine when win10 is allready in dual monitor mode. But when one of the connected monitors is not activated I cannot change settings at all and my code keeps crashing.
Do you now is there any call or Flag that I have to set that this monitor gets active?
thank and all the best, Holunder