有没有办法自己控制hint的显示?

lonelysoul2000 2006-12-05 10:19:20
hint要鼠标在控件上才触发,
能不能不通过鼠标,程序控制它显示出来?
...全文
306 12 打赏 收藏 转发到动态 举报
写回复
用AI写文章
12 条回复
切换为时间正序
请发表友善的回复…
发表回复
lonelysoul2000 2007-04-04
  • 打赏
  • 举报
回复
该贴由《CSDN论坛浏览器:http://CoolSlob.ys168.com/》自动结算
cnhxjtoa 2007-03-13
  • 打赏
  • 举报
回复
var
h: THintWindow;
r: TRect;
p: TPoint;
begin
GetCursorPos(p);
with r do
begin
left := p.X;
top := p.Y;
right := p.X + 100;
bottom := p.Y + 20;
end;
h := THintWindow.Create(Self);
with h do
begin

ActivateHint(r, 'hi there!');

sleep(10000); //10秒后自动消失
ReleaseHandle;
Free;
end;

end;
foryour 2007-02-25
  • 打赏
  • 举报
回复
帮楼主顶上去
希望有人给出一个提示性的代码出来.
withcsharp 2007-02-25
  • 打赏
  • 举报
回复
var
h: THintWindow;
r: TRect;
p: TPoint;
begin
GetCursorPos(p);
with r do
begin
left := p.X;
top := p.Y;
right := p.X + 100;
bottom := p.Y + 20;
end;
h := THintWindow.Create(Self);
with h do
begin

ActivateHint(r, 'hi there!');


// ReleaseHandle;
// Free;
end;
lihuasoft 2007-02-25
  • 打赏
  • 举报
回复
嗯。学习楼上了!
withcsharp 2007-02-25
  • 打赏
  • 举报
回复
var
CursorPos: TPoint;
begin
CursorPos := Point(Button1.Width div 2, Button1.Height div 2);
CursorPos := Button1.ClientToScreen(CursorPos);

Button1.ShowHint := true;
Button1.Hint := 'ccccccccc';
SetCursorPos(CursorPos.X, CursorPos.y);

Application.HintPause := 0;
hangzhou_hammer 2006-12-13
  • 打赏
  • 举报
回复
API:createwindowex();
yinxu 2006-12-12
  • 打赏
  • 举报
回复
Application.OnShowHint();
hangzhou_hammer 2006-12-07
  • 打赏
  • 举报
回复
使用 API:CreateWindow
lihuasoft 2006-12-06
  • 打赏
  • 举报
回复
试了,不行.我没辙了
wywry 2006-12-06
  • 打赏
  • 举报
回复
自己做个None属性的对话框,在需要的时候,显示在某个位置
lihuasoft 2006-12-05
  • 打赏
  • 举报
回复
sendMessage()? 可惜电脑上没装delphi,否则真想立即试一下!

5,388

社区成员

发帖
与我相关
我的任务
社区描述
Delphi 开发及应用
社区管理员
  • VCL组件开发及应用社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧