Resolution can be different for different screens. You need to get the resolution for the active screen.