Added a function to obtain monitor resolution