Make sure you display the owner window first, before setting it as the owner of some other window, otherwise the system will throw an InvalidOperationException:
Some points to note about window ownership:
- The window that has an ownership relationship with another window always appears on top of that owner
- You can drag the window outside the owner window
- When you minimize or close the owner, the other window, which is related to it, will follow the owner and minimize or close respectively
- By default, the window in a relationship gets displayed in the taskbar, but when you minimize the owner, it gets removed from the taskbar
- When you want to break the relationship, just set the Owner property to null