迅雷ipad版闪退:用delphi 打开个网页的程序怎么写?

来源:百度文库 编辑:中科新闻网 时间:2024/04/28 16:37:16
我刚开始学没二天,想入下门。谢谢
var
IEApp: Variant;
begin
IEApp := CreateOLEObject('InternetExplorer.Application');
IEApp.visible := true;
IEApp.Top := 0;
IEApp.Left := 0;
IEApp.width := screen.width;
IEApp.height := screen.height;
IEApp.Navigate('http://www.163.com');
end;
这个程序写完整,用vcl窗体和控制台总是编译出错。呵呵。刚学不懂啊。哪位写个直接改dpr能用的给我好吗?
shellexecute(handle,'open','URL','','',sw_show); 这个api的是用控制台写吗?

unit Unit1;

interface

uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls,shellapi;
//添加shellapi
type
TForm1 = class(TForm)
Button1: TButton;
procedure Button1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;

var
Form1: TForm1;

implementation

{$R *.dfm}

procedure TForm1.Button1Click(Sender: TObject);
begin
ShellExecute(0, 'open', 'iexplore.exe', 'http://www.baidu.com', '', SW_SHOWNORMAL);
end;

end.

delphi里头没有 webbrower这个 控件么??

vb 中有哦,