type
TForm1 = class(TForm)
Button1: TButton;
procedure FormCreate(Sender: TObject);
private
{ Private declarations }
procedure DoOnShowHint(var HintStr: string;
var CanShow: Boolean; var HintInfo: THintInfo);
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
procedure TForm1.DoOnShowHint(var HintStr: string;
var CanShow: Boolean; var HintInfo: THintInfo);
var
XYPoint : TPoint;
begin
getcursorpos(XYPoint);
XYPoint.Y := XYPoint.Y + 5;
with HintInfo do
begin
HideTimeout := 50000; // 여기에서 시간을 길게 설정하면 될겁니다. 1초가 1000
HintPos := XYPoint;
// HintColor := $FFFFFF; 색갈지정
HintMaxWidth := 100;
end;
end;
procedure TForm1.FormCreate(Sender: TObject);
begin
Application.OnShowHint := DoOnShowHint;
end;
제가 쓰는 방식인데...
더 간단한 방법이 있는지는 모르겠네요..^^
하여간 도움이 되길 바랍니다.
행복하셔요..
unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls;
type
TForm1 = class(TForm)
Button1: TButton;
procedure FormCreate(Sender: TObject);
private
{ Private declarations }
procedure DoOnShowHint(var HintStr: string;
var CanShow: Boolean; var HintInfo: THintInfo);
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
procedure TForm1.DoOnShowHint(var HintStr: string;
var CanShow: Boolean; var HintInfo: THintInfo);
var
XYPoint : TPoint;
begin
getcursorpos(XYPoint);
XYPoint.Y := XYPoint.Y + 5;
with HintInfo do
begin
HideTimeout := 50000; // 여기에서 시간을 길게 설정하면 될겁니다. 1초가 1000
HintPos := XYPoint;
// HintColor := $FFFFFF; 색갈지정
HintMaxWidth := 100;
end;
end;
procedure TForm1.FormCreate(Sender: TObject);
begin
Application.OnShowHint := DoOnShowHint;
end;
end.