我想写一个程序,具体实现这种功能 :
能够自动刷新网页,比如说:每隔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窗口,我想要的效果是在当前的窗口中进行刷新,请各位大侠帮忙,最好能写出需要修改的源码,谢谢~~
能够自动刷新网页,比如说:每隔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窗口,我想要的效果是在当前的窗口中进行刷新,请各位大侠帮忙,最好能写出需要修改的源码,谢谢~~
解决方案 »
- 探讨:接口引用 如何从一个接口变量取得其接口类型(GUID)?
- 增加自动排序和滚轮的DBGrid
- [请教]ADO中怎么样设置“不自动提交”
- 怎样在DELPHI中设置系统的桌面,也就是说运行我的程序后我就把桌面给它换了!
- 在线程里调用了主线程的一个函数,是不是实质上还是一个线程?
- 提问:我怎么把下列命令编译到delphi程序中去运行。
- 如何加TSP_xyplot,TSP_xyline控件(急急急急急!!!!)
- 数据库应用程序打包的问题!
- ACCESS数据库里的表打开时提示"...",后打不开,不知如何解决?
- 如何取得当前系统的字体列表
- 总是报错,为什么??
- 如何在自己的程序中加入扫描功能,XP下。在线等待。。
新增個按鈕或定時器, 在裹面寫上:
procedure TForm1.Button2Click(Sender: TObject);
begin
IEApp.Refresh;
end; 就可!
新增個按鈕或定時器, 在裹面寫上:
procedure TForm1.Button2Click(Sender: TObject);
begin
IEApp.Refresh;
end; 就可!