I'm a little stuck here. I am trying to move 2 forms at the same time without using OnMove, LocationChanged, Docking etc.
The only way to interact with their locations is to override WndProc. Something that might be useful is that form A is the owner of form B. Therefore, whenever A moves, I also want to move B. Not in the same place, but at the same distance.
protected override void WndProc(ref Message m) { if (m.Msg == 0x0084) { Form[] temp = this.OwnedForms; if(temp.Length > 0) { } m.Result = (IntPtr)2; return; } base.WndProc(ref m); }
Both A and B have the same WndProc, as they are 2 objects from the same class.
user238801
source share