我程序中的一个运算过程,需要较长时间,我想在运算前在屏幕中间显示消息框的提醒"正在提取数据.....",运算结束时自动消失,请大虾指教!!!

解决方案 »

  1.   

    FormWait := TFormWait.Create;
    FormWait.Show;
    FormWait.Update;
    你的操作....
    FormWait.Hide;
    FormWait.Free;为了效果更好,你还可以这样做:
    1、使用SetWindowPos将提示窗口放在最前面
    2、设置Screen的光标为等待状态
    3、暂时禁用父窗口,操作完成后再恢复
      

  2.   

    type
      TMyThread = class(TThread)
      private
        { Private declarations }
      protected
        procedure Execute; override;
      end;
    implementation
    { TMyThread }
    procedure TMyThread.Execute;
    begin
      { Place thread code here }
    end;
    end.
      

  3.   

    var   SecondProcess: TMyThread; { TMyThread is a custom descendant of TThread }
    begin
      SecondProcess := TMyThread.Create(True); { create suspended ?secondprocess does not run yet }
      SecondProcess.Priority := tpLower; { set the priority to lower than normal }
      SecondProcess.Resume; { now run the thread }
    end;
    (代理服务器有问题,不能发长的留言,请原谅) 
    --------------------------------------
    看!
    那支正飞向太阳的蛾子.....
    就是我!
    --------------------------------------
      

  4.   

    var   SecondProcess: TMyThread; { TMyThread is a custom descendant of TThread }
    begin
      SecondProcess := TMyThread.Create(True); { create suspended ?secondprocess does not run yet }
      SecondProcess.Priority := tpLower; { set the priority to lower than normal }
      SecondProcess.Resume; { now run the thread }
    end;