Setting a form’s bounds can cause the DPI to change

Note to self: Setting a form’s bounds can move the form to a different monitor. If that monitor has a different DPI than the one the form was originally on, this will cause a WM_DPICHANGED message to be sent to the form, which in turn will change the form’s bounds again.

This happened, for example, in the GExperts forms when their constructor read their position and size from the registry. The effect was that the size of the form grew by the scaling difference each time the form was displayed.

I fixed this today after spending many hours trying to find the cause.