User Tools

Site Tools


putting_20an_20image_20on_20the_20clipboard

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

putting_20an_20image_20on_20the_20clipboard [2018/03/31 13:19]
127.0.0.1 external edit
putting_20an_20image_20on_20the_20clipboard [2018/04/13 15:54] (current)
richardrussell Added syntax highlighting
Line 1: Line 1:
 =====Putting an image on the clipboard===== =====Putting an image on the clipboard=====
  
-//by Richard Russell, March 2012//\\ \\  Putting an image on the clipboard is straightforward:​\\ +//by Richard Russell, March 2012//\\ \\  Putting an image on the clipboard is straightforward:​ 
 + 
 +<code bb4w>
         cx% = 0         cx% = 0
         cy% = 0         cy% = 0
Line 9: Line 11:
         SYS "​SetClipboardData",​ CF_BITMAP, hbitmap%         SYS "​SetClipboardData",​ CF_BITMAP, hbitmap%
         SYS "​CloseClipboard"​         SYS "​CloseClipboard"​
 +</​code>​
 +
 Here **pic$** is the full path and filename to the image file (which can be a BMP, EMF, GIF, ICO, JPEG or WMF). If you want to support a wider range of formats (including PNG and TIFF) then call [[/​Loading%20a%20PNG%20or%20TIFF%20image|FNloadimagegdip]] or [[/​Loading%20a%20PNG%20or%20TIFF%20image|FNloadimagegdip2]] rather than [[/​Loading%20a%20GIF%20or%20JPEG%20image|FNloadimage]]. Here **pic$** is the full path and filename to the image file (which can be a BMP, EMF, GIF, ICO, JPEG or WMF). If you want to support a wider range of formats (including PNG and TIFF) then call [[/​Loading%20a%20PNG%20or%20TIFF%20image|FNloadimagegdip]] or [[/​Loading%20a%20PNG%20or%20TIFF%20image|FNloadimagegdip2]] rather than [[/​Loading%20a%20GIF%20or%20JPEG%20image|FNloadimage]].
putting_20an_20image_20on_20the_20clipboard.txt · Last modified: 2018/04/13 15:54 by richardrussell