Improved compatibility of the RobotWindow with Windows.

Improved compatibility of the RobotWindow with Windows.