截获与管理windows的消息
摘 要:如何用一个程序截获管理windows的消息
关键字:windows 消息 监听 列表
类 别:系统控制
{ 这个例子定义的程序可以收取所有发往主窗口的消息 }
unit testeandoesta;
interface
uses
sysutils, wintypes, winprocs, messages, classes, graphics, controls, forms, dialogs, menus;
type
tform1 = class (tform)
private {private declarations}
public {public declarations}
procedure winmsg (var msg : tmsg; var handled : boolean);
end;
var
form1 : tform1;
implementation
{$r *.dfm}
{ 所有发送到主窗体的消息,保存在变量msg中。 }
procedure tform1.winmsg (var msg : tmsg; var handled : boolean);
begin
if msg.message = wm_syscommand then beep;
{ 接收到消息时的通知}
end;
procedure tform1.formcreate (sender : tobject);
begin
application.onmessage := winmsg;
{ 替换消息句炳}
end;
本文关键:截获与管理
相关方案
- Delphi组件如何放到自己的…
- 设计模式学习心得之二(Fact…
- 感知鼠标移入移出组件…
- qq2004hack…
- 我写的采用csv格式将数据转换…
- DesignPattern之F…
- 将DBGrid 当前列定位到指…
- 看到一篇好文章与大家分享!!!…
- 谈Delphi下Interne…
- Delphi中的线程类--之(…
- Delphi中布尔类型辨析…
- Create a simple…
- 第5部分 编译文件(第12页)…
- 数据补丁…
- Creating Forms …
- Delphi中的线程类--之(…
- 第十六期:CSDN论坛秀-De…
- 利用Delphi和金山词霸制作…
- 用delphi操作INI文件…
- 分布式数据库中的关键问题 de…