02-08-2022, 06:14 PM
It is a bug in that control. Invoke() just asks it to do something. When DPI-related anomalies happen, try to find/get the element with flag UIA. In this case there is no flag, but a bool parameter. Try
-----
This probably isn't the reason, but child windows cannot be activated and therefore c.Activate() activates w instead. You may want to c.Focus().
-----
This probably isn't the reason, but child windows cannot be activated and therefore c.Activate() activates w instead. You may want to c.Focus().