hint要鼠标在控件上才触发,
能不能不通过鼠标,程序控制它显示出来?

解决方案 »

  1.   

    sendMessage()?   可惜电脑上没装delphi,否则真想立即试一下!
      

  2.   

    自己做个None属性的对话框,在需要的时候,显示在某个位置
      

  3.   

    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;
      

  4.   

    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;
      

  5.   

    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;
      

  6.   

    该贴由《CSDN论坛浏览器:http://CoolSlob.ys168.com/》自动结算