摘要:
通过 Application.OnMessage 响应消息: unit Unit1; interface uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls; type TForm1 = class(TForm) Memo1: ... 阅读全文
摘要:
本例效果图: 代码文件: unit Unit1; interface uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls; type TForm1 = class(TForm) Memo1: TMemo; proce... 阅读全文
摘要:
本例效果图: 代码文件: unit Unit1; interface uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls, ExtCtrls; type TForm1 = class(TForm) Panel1: TPane... 阅读全文
摘要:
消息流程: 譬如用鼠标左键点击一下窗体, 系统会收到一条 WM_LBUTTONDOWN 消息; 当鼠标抬起, 系统又会收到 WM_LBUTTONUP 消息. 系统收到消息后, 会告诉窗体发生的事情, 然后窗体再做出反应; 当然窗体能否做出反应要看窗体是否有相应的响应代码. 要响应 WM_LBUTTONDOWN 消息, 我们需要在 OnMouseDown 事件中写代码; 要响应 WM_LBU... 阅读全文
摘要:
unit Unit1; interface uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls; type TForm1 = class(TForm) Button1: TButton; procedure Button... 阅读全文