procedure TForm1.scGPLabel1MouseEnter(Sender: TObject);
begin
TControl(Sender).ShowHint := True;
end;
procedure TForm1.scGPLabel1MouseLeave(Sender: TObject);
begin
TControl(Sender).ShowHint := False;
end;
procedure TForm1.scGPLabel1MouseMove(Sender: TObject; Shift:
TShiftState; X, Y: Integer);
begin
FMyPosCurrPoint.X := mouse.CursorPos.X - X;
FMyPosCurrPoint.Y := mouse.CursorPos.y - Y;
Application.ActivateHint(FMyPosCurrPoint);
//想直接在这里控制,不知道怎么调试都不行。
end;
procedure TForm1.FormCreate(Sender: TObject);
begin
Application.HintPause := 0; //立即显示
Application.HintHidePause := 100000;
Screen.HintFont.Color := clred;
Screen.HintFont.Size := 9;
Application.OnShowHint := MyShowHint;
end;
procedure TForm1.MyShowHint(var HintStr: string; var CanShow: Boolean;
var HintInfo: THintInfo);
begin
dec(HintInfo.HintPos.y, HintInfo.HintControl.Height+27);
end;
04-24
190
05-18
“相关推荐”对你有帮助么?
-
非常没帮助
-
没帮助
-
一般
-
有帮助
-
非常有帮助
提交