最近我做了一个小程序,其中要求程序中要显示网页还要显示网页中的图片,然后每10分钟刷新一次网页请教个人高手 代码如何写,谢谢了。。

解决方案 »

  1.   

    procedure TForm1.Button1Click(Sender: TObject);
    begin
      WebBrowser1.Navigate('http://www.baidu.com');
    end;procedure TForm1.Timer1Timer(Sender: TObject);
    beginend;使用 TWebBrowser和Timer
      

  2.   

    unit Unit1;interfaceuses
         Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
         Dialogs, ExtCtrls, OleCtrls, SHDocVw;type
         TForm1 = class(TForm)
              WebBrowser1: TWebBrowser;
              Timer1: TTimer;
              procedure FormCreate(Sender: TObject);
        procedure Timer1Timer(Sender: TObject);
         private
              { Private declarations }
         public
              { Public declarations }
         end;var
         Form1: TForm1;implementation{$R *.dfm}procedure TForm1.FormCreate(Sender: TObject);
    begin
         timer1.Interval := 10000;
         WebBrowser1.Navigate('http://baidu.com');
    end;procedure TForm1.Timer1Timer(Sender: TObject);
    begin     WebBrowser1.Navigate('http://baidu.com');
    end;end.
    如果刷新程序吧,,你1秒钟刷一次都没有用,,有些程序是限定IP的,,,如google等很多广告程序,,最好的办法是用idhttp 代理IP,,不过找几百个代理IP不好找。
      

  3.   

    UP
    当然,10分钟刷新一次,可以使用网页头部加入如下代码:
    <Meta http-equiv="Refresh" Content="600">
    我试过,比用定时器效果好一些
      

  4.   

    UP
    当然,10分钟刷新一次,可以使用网页头部加入如下代码:
    <Meta http-equiv="Refresh" Content="600">
    我试过,比用定时器效果好一些
      

  5.   

    UP
    当然,10分钟刷新一次,可以使用网页头部加入如下代码:
    <Meta http-equiv="Refresh" Content="600">
    我试过,比用定时器效果好一些