w32-send-sys-command can be used to simulate
choosing commands from the system menu (in the top left corner of the
Window) and a few other system wide functions. It takes an integer
argument, the value of which should be a valid
message as documented in Microsoft's API documentation.