我想写一个程序,具体实现这种功能 :
能够自动刷新网页,比如说:每隔5分钟就刷新一次,请问在delphi中怎么实现?unit Unit1;interfaceuses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, StdCtrls, Comobj;type
  TForm1 = class(TForm)
    Button1: TButton;
    procedure Button1Click(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;var
  Form1: TForm1;
  IEApp: Variant;implementation{$R *.dfm}procedure TForm1.Button1Click(Sender: TObject);
begin
  IEApp := CreateOLEObject('InternetExplorer.Application');
  IEApp.visible := true;
  IEApp.Top := 0;
  IEApp.Left := 0;
  IEApp.width := screen.width;
  IEApp.height := screen.height;
  IEApp.Refresh;
end;end.以上是源码,但是在运行的时候每按一次按钮就会创建一个新的ie窗口,我想要的效果是在当前的窗口中进行刷新,请各位大侠帮忙,最好能写出需要修改的源码,谢谢~~

解决方案 »

  1.   

    分成兩部分, 在兩個按鈕中實現, 一個只執行一次, 就是創建, 另外一個就是定時刷新!!
    新增個按鈕或定時器, 在裹面寫上:
    procedure TForm1.Button2Click(Sender: TObject);
    begin
      IEApp.Refresh;
    end; 就可!
      

  2.   

    分成兩部分, 在兩個按鈕中實現, 一個只執行一次, 就是創建, 另外一個就是定時刷新!!
    新增個按鈕或定時器, 在裹面寫上:
    procedure TForm1.Button2Click(Sender: TObject);
    begin
      IEApp.Refresh;
    end; 就可!
      

  3.   

    就是一个timer嘛,里边执行刷新任务