As the title states.
I'd like to be able to tie into an event somehow that notifies my application when the screen resolution is going to change, or screens are added/removed.
Mainly I want to write an app that keeps track of where applications are running on my multiple screens, so that when I undock my laptop, and then redock it, it can reposition windows where they were, instead of stacking them all on my primary monitor.
(re: to solve this problem: https://superuser.com/questions/289908/windows-7-constantly-forgets-my-dual-monitor-setup)
You can use the DisplaySettingsChanged event. The SystemParameters class will give you limited information about the primary screen as well as the virtual screen (the bounding rectangle of all your screens; only useful for simple setups), but if you want more specific information you'll probably need to pinvoke the Win32 API.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With