MASM32 Downloads
GuiParas equ "Copy & save a window", w900, h500, b GreenBlue ; centered, width+height, backgroundinclude \masm32\MasmBasic\Res\MbGui.asm invoke ShowWindow, hGui, SW_HIDE MsgBox 0, "Activate the window you want to copy & save, then come back here", "Screenshotter:", MB_OKCANCEL or MB_TOPMOST If_ eax==IDCANCEL Then invoke SendMessage, hGui, WM_CLOSE, 0, 0 invoke Sleep, 100 invoke keybd_event, VK_SNAPSHOT, 1, KEYEVENTF_EXTENDEDKEY, 0 invoke ShowWindow, hGui, SW_SHOWEvent Paint GuiImageCallback SaveIt ; define a callback function GuiImage clipboard, fit ; display the current screenshot ShEx "window.jpg" ; open the default viewer, then quit invoke SendMessage, hGui, WM_CLOSE, 0, 0EndOfEventsSaveIt: SaveImageToFile "window.jpg" retGuiEnd