Fix mouse capture issues on high-dpi displays.

Remove dependency on System.Windows.Forms.