A
archonwang
Unregistered / Unconfirmed
GUEST, unregistred user!
我想写一个程序,具体实现这种功能 :
能够自动刷新网页,比如说:每隔5分钟就刷新一次,请问在delphi中怎么实现?
我在浏览资料后写了这样一段程序:
unit Unit1;
interface
uses
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 :=
IEApp.visible := true;
IEApp.Top := 0;
IEApp.Left := 0;
IEApp.width := screen.width;
IEApp.height := screen.height;
IEApp.Navigate('http://www.delphibbs.com');
end;
end.
但是使用CreateOLEObject('InternetExplorer.Application')的问题就是不能在当前已经打开的窗口里进行ie的控制,它总是会新打开一个ie窗口,请大家帮忙解决
能够自动刷新网页,比如说:每隔5分钟就刷新一次,请问在delphi中怎么实现?
我在浏览资料后写了这样一段程序:
unit Unit1;
interface
uses
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 :=
IEApp.visible := true;
IEApp.Top := 0;
IEApp.Left := 0;
IEApp.width := screen.width;
IEApp.height := screen.height;
IEApp.Navigate('http://www.delphibbs.com');
end;
end.
但是使用CreateOLEObject('InternetExplorer.Application')的问题就是不能在当前已经打开的窗口里进行ie的控制,它总是会新打开一个ie窗口,请大家帮忙解决