放一个IMAGE,Visiable设为FALSE,当OnMouseMove时,将Visiable设为TRUE不就可以
了吗?
了吗?
解决方案 »
- 在delphi中查询时在Edit控件中输入数字就行,输入文本或时间就不行????????
- 我是个新手,我这里查不到取系统时间的函数,哪位知道?????谢谢!!!
- 金额的小数点后两位怎样设置可以显示出来?
- 讨论 OnCloseQuery
- 怎么实现当执行QuickRep1.Preview后让报表预览限制在我锁定的区域里(如容器panel里)
- fastReport动态报表的问题,请各位兄弟帮忙!
- 请问我是DEPHI 6 + window 2000 + sql server , 在这样的环境下,我还需要安装ADO补丁吗
- 探讨这样一个问题:有一个edit的控件,以edit.text的内容作为查询条件对数据库进行操作,但是对所查询的结果要另存在另一个表中,最后在完全
- 三层结构如何调试?
- 如何让edit 编辑状态的光标用代码将其移到行末?
- 怎样使.showmodal显示的窗口返回一个特定值?
- 请推荐几个制作安装程序的软件?
你可以在这个方法的基础上自己实现其他的功能和优化.unit Unit1;
interface
uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
ExtCtrls, StdCtrls;
type
TForm1 = class(TForm)
Image2: TImage;
procedure FormCreate(Sender: TObject);
procedure FormMouseMove(Sender: TObject; Shift: TShiftState; X,
Y: Integer);
procedure Image2MouseMove(Sender: TObject; Shift: TShiftState; X,
Y: Integer);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
bmpshow:boolean;
implementation
{$R *.DFM}
procedure TForm1.FormCreate(Sender: TObject);
begin
bmpshow:=false;
end;
procedure TForm1.FormMouseMove(Sender: TObject; Shift: TShiftState; X,
Y: Integer);
begin
if bmpshow=true then
begin
bmpshow:=false;
try
image2.Free;
image2:=timage.Create(self);
image2.Parent:=self;
image2.Left:=64;
image2.top:=40;
image2.height:=217;
image2.width:=273;
image2.OnMouseMove:=Image2MouseMove;
except
end;
end;
end;
procedure TForm1.Image2MouseMove(Sender: TObject; Shift: TShiftState; X,
Y: Integer);
begin
if bmpshow=false then
begin
bmpshow:=true;
image2.Picture.Bitmap.LoadFromFile('d:\图片.bmp');
end
end;
end.
要么自己捕捉消息 CM_MOUSELEAVE、CM_MOUSEENTER;