如何获得 鼠标在莫个窗体上的 移入和移出 事件 , 不管该窗体是否是激活的
解决方案 »
- fastReport 赋值 OnGetValue 不会触发?
- DBGridEh打印时,如果让表格在页面居中???在线。。。。。。
- Delphi 交流群
- 招聘也是一类信息而已。为什么抹杀程序员了解这类信息呢。
- IdFTP1 如何自动取得服务器上的文件名?
- 初用DELPHI,请教DCU文件的问题。
- ***简单语法问题。***
- 各位大虾:用键盘钩子做了个截获键盘信息的程序,可是它响应两个事件,KEY_DOWN和KEY_UP,所以输出的是双份的,怎么编程实现只响应一个事件,还
- 关于操作word文档时的错误处理!
- 请精通统计报表的delphi高人解答!急!
- 一条记录中字段间的最小值sql语句怎样写?
- 增加相应记录的问题!
procedure CMMouseleave(var Message: TMessage); message CM_MOUSELEAVE;
unit Unit1;interfaceuses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, ExtCtrls;type
TForm1 = class(TForm)
Button1: TButton;
Timer1: TTimer;
Panel1: TPanel;
procedure Timer1Timer(Sender: TObject);
private
protected
{ Private declarations }
public
{ Public declarations } end;var
Form1: TForm1;implementationuses Unit2, Math;{$R *.dfm}procedure TForm1.Timer1Timer(Sender: TObject);
var H:HWND;
begin
H:=WindowFromPoint(Mouse.CursorPos);
if (H<>Handle) and ( not IsChild(Handle,H))then
begin
caption:='Mouse Leave';
end
else
begin
caption:='Mouse Enter';
end;
Application.ProcessMessages;
end;end.