在你的程序中拦截这些剪贴版的消息(可能要不来这么多),不处理它就可以了
WM_COPY
WM_CUT
WM_PASTE 可以这么做
procedure ClipCopy(var M:TMessage); Message WM_COPY;
begin
end;
我没有试过(我机器上没装Delphi),如果不行看看消息的返回值。开不行就看一看TCustomEdit的原码。当最为密码框使用的时候,它也不响应剪贴版的消息
WM_COPY
WM_CUT
WM_PASTE 可以这么做
procedure ClipCopy(var M:TMessage); Message WM_COPY;
begin
end;
我没有试过(我机器上没装Delphi),如果不行看看消息的返回值。开不行就看一看TCustomEdit的原码。当最为密码框使用的时候,它也不响应剪贴版的消息
解决方案 »
- 请问Record类型和OleVariant类型怎样互相转换
- Delphi2007的Build问题
- 用Delphi開發的公司會不會要用C++Builder的程序員
- 请教有关SQL字段属性!
- 怎样合并字符串?
- 使用TClientDataSet的SaveToStream和LoadFromStream来对其DATA进行传递的问题
- Params.WndParent := GetDesktopWindow;导致的问题
- 使用delphi处理C的dll的问题?
- 高分请教如何用DELPHI的SERVERS组件对WORD进行全面操作!
- 文件解压缩+加解密问题
- 我想做个主页, 大家帮我想个好听的名字吧! 谢谢
- 如何动态加减pagecontrol的页数
结束时CloseClipboard.OpenOpens the clipboard, preventing other applications from changing its contents until the clipboard is closed.procedure Open;DescriptionCall 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.
clipboard了
采用Override的方法,Override Form的不行啊!难道要Override Edit or Memo...的Wndproc吗?拦截消息的方法也不行啊!拦截Form的WM_COPY没有任何反映!拦截Application的WndProc也没有用!
type
tmyedit=class(tedit)
procedure wmcopy(var msg:tmessage);message wm_COPY;
end;type
TForm1 = class(TForm)
procedure FormCreate(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;var
Form1: TForm1;
myedit:tmyedit;
implementation{$R *.DFM}procedure TMyedit.wmcopy(var msg:tmessage);
begin
showmessage('kfdsjdfs');
end;procedure TForm1.FormCreate(Sender: TObject);
begin
notitle:=false;
myedit:=tmyedit.Create(self);
myedit.parent:=form1;
end;end.