* Copies an image to the clipboard * The Image must be in a form #define CF_BITMAP 2 lparameters toImage, toForm local lnHwnd, lnHDC, lnHDC_Mem, lnHBitMap, lnHPrevBmp, lnLeft, lnTop, lnWidth, lnHeight declare integer GetDC in win32api ; integer nhwnd declare integer CreateCompatibleDC in win32api ; integer nhcd declare integer BitBlt in win32api ; integer hDestDC, ; integer x, ; integer y, ; integer nWidth, ; integer nHeight, ; integer hScrDC, ; integer xsrc, ; integer ysrc, ; integer dwRop declare integer SelectObject in win32api ; integer hDC, ; integer hObject declare integer CreateCompatibleBitmap in win32api ; integer hDC, ; integer nWidth, ; integer nHeight declare integer DeleteDC in win32api ; integer hDC declare integer ReleaseDC in win32api ; integer nwnd, ; integer hdc declare integer DeleteObject in win32api ; integer hDC declare OpenClipboard in win32api ; integer hWndNewOwner declare CloseClipboard in win32api declare EmptyClipboard in win32api declare integer SetClipboardData in win32api ; integer nFormat, ; integer hObject declare long UuidFromString in rpcrt4.dll ; string StringUuid, ; string @ Uuid declare long GdipSaveImageToFile in GdiPlus.dll ; long GpImage, ; string FileName, ; string @ encoderClsid, ; string @ encoderParams declare integer WriteFile IN kernel32; integer hFile,; string @ lpBuffer,; integer nBt2Write,; integer @ lpBtWritten,; integer lpOverlapped declare integer OpenFile IN kernel32; string lpFileName,; string @ lpReOpenBuff,; integer wStyle lnHWnd = toForm.HWnd lnHDC = GetDC(lnHWnd) lnHDC_Mem = CreateCompatibleDC(lnHDC) lnHBitMap = CreateCompatibleBitmap(lnHDC, toImage.width, toImage.height) if toImage.baseclass='Form' lnLeft = 0 lnTop = 0 lnWidth = toImage.Width lnHeight = toImage.Height else lnLeft = OBJTOCLIENT(toImage, 2) lnTop = OBJTOCLIENT(toImage, 1) lnWidth = OBJTOCLIENT(toImage, 3) lnHeight = OBJTOCLIENT(toImage, 4) endif if lnHBitMap <> 0 lnHPrevBmp = SelectObject(lnHDC_Mem, lnHBitMap) BitBlt(lnHDC_Mem, 0, 0, lnWidth, lnHeight, lnHDC, lnLeft, lnTop, SRCCOPY) if OpenClipboard(lnHWnd) EmptyClipboard() SetClipboardData(CF_BITMAP, lnHBitMap) CloseClipboard() else wait window 'Could not open the ClipBoard! Operation failed' endif SelectObject(lnHDC_Mem, lnHPrevBmp) && Previous object should be re-selected else wait window 'Could not create a copy of the bitmap!. Operation failed' endif DeleteDC(lnHDC_Mem) ReleaseDC(lnHWnd, lnHDC)Also note that the only use of the Form parameter is it's window handle and for the image just the positioning, so it can be any container/object etc.