在你的程序中拦截这些剪贴版的消息(可能要不来这么多),不处理它就可以了(用几个空的标准的Action就可以了。)
WM_COPY
WM_CUT
WM_PASTE
可以这么做
procedure ClipCopy(var M:TMessage); Message WM_COPY;
begin
end;
不难,override Wndproc处理,将WM_COPY,WM_PASTE WM_CUT过滤。
在程序运行时Open
结束时Close
Clipboard.Open
Opens the clipboard, preventing other applications from changing its contents until the clipboard is closed.
procedure Open;
Description
Call Open before adding a series of items to the clipboard. This prevents other applications from overwriting the clipboard until it is closed. (When adding a single item to the clipboard, there is no need to call Open.)
When an application has finished adding items to the clipboard, it should call the Close method. The clipboard can be opened with multiple calls to the Open method before being closed. Open and Close maintain a count of the number of times the clipboard has been opened and will not close it until Close has been called the same number of times.