Now Windows also sends a couple of messages to everyone about certain things. Like you can get a WM_DISPLAYCHANGE message whenever the display setup changed. Also the WM_DEVICECHANGE message informs about devices coming and going.
To use this, get a subclass of WinNotificationMBS and add the GotNotification event. Now listen for messages WM_DISPLAYCHANGE (&h7E) and WM_DEVICECHANGE (&h0219). The event will be called with those message codes so you can check state and update your app.
PS: On Mac you can also get similar events with NSWorkSpaceMBS and NSNotificationObserverMBS.