1. Clipbrd function
function Clipboard:tclipboard: If the application has never used the clipboard, call it to form a new clipboard and return the used clipboard if the Clipboard was previously used.
Property: Astext: Exports the contents of the clip as a string; Method: Hasformat: Indicates whether the Clipboard contains data in the specified format. For example:
[Delphi] View Plain Copy
Procedure Tform1.button1click (Sender:tobject);
Begin
If Clipboard.hasformat (cf_text) Then
MEMO1.LINES.ADD (Clipboard.astext);
End
2. SetClipboard function
function SetClipboard (newclipboard:tclipboard): Tclipboard;: Replaces the global clipboard with a new Clipboard object. For example:
[Delphi] View Plain Copy
Var
Myclip:tclipboard;
Begin
Myclip: = tclipboard.create;
SetClipboard (Myclip);
Image1.Picture.Assign (Myclip);
End
Delphi's Windows Clipboard manipulation function