06-26-2014, 12:08 PM
The code is correct, but don't need to capture 2 times.
Look in Task Manager, maybe QM or some other process uses very much memory or many GDI objects. White screen could be if QM fails to allocate memory for whole screen, it may require 5-10 MB for each monitor, depending on screen size.
Function CaptureImage
Trigger CWc
Look in Task Manager, maybe QM or some other process uses very much memory or many GDI objects. White screen could be if QM fails to allocate memory for whole screen, it may require 5-10 MB for each monitor, depending on screen size.
Function CaptureImage
Trigger CWc

RECT r
str sout.from("$temp$\Image_" _s ".bmp")
__GdiHandle hBitmap
int i=CaptureImageOrColor(hBitmap 0 0 sout r)
if !i
,out "Failed to capture"
,end
int q=OpenClipboard(_hwndqm)
if(q) EmptyClipboard; q=SetClipboardData(CF_BITMAP hBitmap)!0; CloseClipboard
if(q) hBitmap.handle=0
_s.from("Image captured stored to clipboard - also stored to file " sout)
OnScreenDisplay _s