nod31
asked on
clipbrd
i have a memo and would like to know how can i :-
read contents of clipboard into it using a button
write contents of memo to the clipboard
clear the clipboard
read contents of clipboard into it using a button
write contents of memo to the clipboard
clear the clipboard
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Oh, I hadn't thought of that, though it would work just fine. You'll only have to chek & ensure that there's text in the clipboard, something like this should work:
if clipBoard.hasFormat(CF_TEX T) then
memo1.pasteFromClipBoard;
GL
Mike
if clipBoard.hasFormat(CF_TEX
memo1.pasteFromClipBoard;
GL
Mike
I forgot the third thing, if you want to clear the clipboard
uses clipbrd ;
procedure TForm1.Button1Click(Sender : TObject);
begin
ClipBoard.Clear;
end;
uses clipbrd ;
procedure TForm1.Button1Click(Sender
begin
ClipBoard.Clear;
end;
To copy text from memo to clipboard
Memo1.CopyToClipboard;
to copy text from Clipboard to memo
Memo1.PasteFromClipboard;