请教:能否hint一个Form?
显示的hint只有一行文字,有时候需要显示一个form,而又不需要弹出窗口,又没有什么办法用hint那样显示出来?
显示的hint只有一行文字,有时候需要显示一个form,而又不需要弹出窗口,又没有什么办法用hint那样显示出来?
解决方案 »
- 换了新工作,闪分,进者有份!送完为止!!!
- 如何动态生成一个bmp,在其canvas上画一个圆,然后用其做为鼠标形状呢?
- 靠!怎么都有Bug啊,空工程都有内存泄露!
- Indy 收取邮件问题,保存邮件内容不正常
- 丁丁销售助理又推出了新的版本 ---V3.2,欢迎下载使用!来者有份
- 就这100分了,关于reintroduce
- 对 cg1120(代码最优化-§雨后看见彩虹……§)的代码的问题,大家帮看一下.
- Delphi GDI+实现图片合并,急急急!!!!
- 请问各位知道哪儿有专门讲delphi的报表的书吗?(电子书也可以)
- 有长春人吗?加我好吗?我的Q:105923399
- 寻一控件
- ListView 如何设置显示数据不能修改
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, CommCtrl, StdCtrls;type
TForm1 = class(TForm)
Button1: TButton;
procedure FormCreate(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;var
Form1: TForm1;implementation{$R *.dfm}var
fTipHandle : HWND;procedure PopTip(
sText : string;
nIcon : Integer;
p : TPoint;
timeout : Integer=5;
sTitle :string = '');
const
TTS_BALLOON = $0040;
TTS_CLOSE = $0080;
TTF_PARSELINKS = $1000;
TTM_SETTITLE = WM_USER + 32;
var
i : Integer;
ftoolInfo : tagToolInfoA;
str : string;
begin if fTipHandle <> 0 then
begin
DestroyWindow(fTipHandle);
end;
fTipHandle := CreateWindow(TOOLTIPS_CLASS, nil,
WS_POPUP or TTS_NOPREFIX or TTS_BALLOON or TTS_ALWAYSTIP or TTS_CLOSE,
0, 0, 0, 0, Application.Handle,
0, HInstance, nil); if fTipHandle = 0 then Exit; fToolInfo.cbSize := SizeOf(fToolInfo);
fToolInfo.uFlags := TTF_PARSELINKS or TTF_IDISHWND or TTF_TRACK;
fToolInfo.uId :=Application.Handle;
fToolInfo.lpszText := PAnsiChar(sText);
SendMessage(fTipHandle, TTM_ADDTOOL, 0, Integer(@fToolInfo));
SendMessage(fTipHandle, TTM_SETTOOLINFO, 0, Integer(@fToolInfo)); str := sTitle;
if str = '' then str := Application.Title;
SendMessage(fTipHandle, TTM_SETTITLE, 1, Integer(str));
SendMessage(fTipHandle, TTM_TRACKPOSITION, 0, MAKELONG(p.X , p.Y));
SendMessage(fTipHandle, TTM_TRACKACTIVATE, Integer(True), Integer(@fToolInfo)); for i := 0 to timeout * 50 do
begin
Sleep(20);
Application.ProcessMessages;
end; DestroyWindow(fTipHandle);
end;procedure TForm1.FormCreate(Sender: TObject);
var
p: tpoint;
begin
p.x:=400;p.Y:=400;
if true then
PopTip('提示XXX',0,p,3,'');
end;end.
我测试时发现一个问题,就是如果需要判断是否有鼠标点下,在Form上点鼠标,有WM_LBUTTONDOWN消息产生,但是在Form上的控件上点鼠标,却没有WM_LBUTTONDOWN消息产生,有什么好办法能够判断Form上是否有鼠标按下吗?