Get a Snapshot of Desktop?
BlitzMax Forums/BlitzMax Programming/Get a Snapshot of Desktop?
| ||
Hi, Does anyone know how to grab a screenshot of the desktop (or a portion of it)? Cheers Sin |
| ||
On Window's you press and hold Ctrl, then press Print Screen. It puts it into the clipboard. Then you can paste it into some application like Paintshop Pro. On the Mac it's something like Apple-Shift-3, or Apple-Shift-4 to grab an area. Not sure if it's the apple key or the Option key. As to doing it from within BlitzMax, that's another story. |
| ||
A rough example:Window:TGadget = CreateWindow("Desktop", 250, 250, ClientWidth(Desktop()), ClientHeight(Desktop())) dsDC = GetDC(QueryGadget(Window, QUERY_HWND_CLIENT)) dhWnd = GetDesktopWindow() BitBlt dsDC, 0, 0, ClientWidth(Desktop()), ClientHeight(Desktop()), GetDC(dhWnd), 0, 0, $00CC0020 Repeat Until WaitEvent() = EVENT_WINDOWCLOSE |
| ||
Thanks Eikon, will give that a try. :) Sin |