是不是用mousemove函数?
  该怎么写呢?

解决方案 »

  1.   

    在表单上放 TApplicationEvents然后在 ONHint 事件上定代码。procedure TMainForm.ApplicationEvents1Hint(Sender: TObject);
    begin
      StatusBar.Paenls[0].Text:= Application.Hint
    end;
      

  2.   

    button的属性showhint设置为True,hint写上相应的注解就可以了。
      

  3.   

    但是hint 好象只能够 …………
    overtime(空间在线) (,能够给个具体的例子?
      

  4.   

    to Maple119(枫叶) : 你的方法 我试过了 不行。
      

  5.   

    type
      TForm1 = class(TForm)
        Button1: TButton;
        StatusBar1: TStatusBar;
        Edit1: TEdit;
        procedure FormCreate(Sender: TObject);
      private
        { Private declarations }
      public
        procedure DisplayHint(Sender: TObject);
      end;var  Form1: TForm1;
    implementation
    {$R *.DFM}{ Here is the implementation of the OnHint event handler }{ It displays the application current hint in the status bar }
    procedure TForm1.DisplayHint(Sender: TObject);
    begin
      StatusBar1.SimpleText := GetLongHint(Application.Hint);
    end;{ Here is the form OnCreate event handler. }{ It assign the application OnHint event handler at runtime }
    { because the Application is not available in the Object Inspector }
    { at design time }
    procedure TForm1.FormCreate(Sender: TObject);
    begin
      Application.OnHint := DisplayHint;
    end;Note: It is not actually necessary to write an OnHint event handler to display hints on the status bar. This can be accomplished more simply by setting the status bar AutoHint property.