有没有什么办法使panel的hint在鼠标进入的时候强行快速出现?

解决方案 »

  1.   

    begin
      Application.Initialize;
      Application.HintPause := 0;//在工程文件中加上這句話
      Application.CreateForm(TForm1, Form1);
      Application.Run;
    end.
      

  2.   

    你还可以通过设置Application.HintHidePause控制显示时间,
    Application.HintColor设置颜色...
      

  3.   

    自己写个构件在panel的wm_mouseenter里面写东西就是了!
      

  4.   

    1.如果想让整个应用程序的hint都快速出现,则赞同 shang53(阿遙)、 Liujc(阿聪)的方法。
    2.如果只是想使某个控件如“panel”的hint在鼠标进入的时候强行快速出现,则也有办法。写控件也可以,不过也有其他办法。
    直接处理鼠标事件,并捕获鼠标。
    procedure TForm1.Panel1MouseMove(Sender: TObject; Shift: TShiftState; X,
      Y: Integer);
    begin
      if Mouse.Capture<>Panel1.Handle then
        begin
          SetCapture(Panel1.Handle);
          Application.ActivateHint(Mouse.CursorPos);
        end
      else
        begin
          if WindowFromPoint(Panel1.ClientToScreen(POINT(X,Y)))<>Panel1.Handle then
            ReleaseCapture;
         end;
    end;同样可以用于其他控件。怎么样,解决了吧?!