In virtualbox, the screen resolution can be anything – even something strange like 993×451, etc. I tried changing it using pywin32 but I failed::
>>> dm = win32api.EnumDisplaySettings(None, 0)
>>> dm.PelsHeight = 451
>>> dm.PelsWidth = 950
>>> win32api.ChangeDisplaySettings(dm, 0)
-2L
which ends up being:
DISP_CHANGE_BADMODE
any help?
The way I found to do this is to enable the automatic client resizing from the Guest OS. Then, in the host OS, programatically resize the VM window. This will cause the resolution to change.