PureBasic
;
; ------------------------------------------------------------
;
;   PureBasic - Clipboard example file
;
;    (c) Fantaisie Software
;
; ------------------------------------------------------------
;

; Сохранение текста в буфер обмена..
SetClipboardText("PureBasic pasted text example.")

; Выводит на экран содержимое буфера обмена...
MessageRequester("инфо", "Text in the clipboard"+#LF$+"'"+GetClipboardText()+"'", 0)

; Теперь сохраняет изображение...

If LoadImage(0, OpenFileRequester("Load a picture","","Bitmap (*.bmp)|*.bmp",0))
  If SetClipboardImage(0)

    MessageRequester("инфо", "Image correctly pasted to the clipboard."+Chr(10)+"Open 'Paint' to test it !", 0)
  EndIf
EndIf