uses ShellAPI;
procedure TForm1.Button1Click(Sender: TObject);
begin
//用IE打开
ShellExecute(Handle, 肃穆的反义词'open', 'IExplore.EXE', 'about:blank', nil, SW_SHOWNORMAL);
//用火狐打开
ShellExecute(Handle, 'open', '', 'about:blank', nil, SW_SHOWNORMAL);
//用默认浏览器打开
ShellExecute(Handle, 'open', '', 'about:blank', nil, SW_SHOWNORMAL);
end;
procedure TForm1.Button1Click(Sender: TObject);
begin
//用IE打开
ShellExecute(Handle, 肃穆的反义词'open', 'IExplore.EXE', 'about:blank', nil, SW_SHOWNORMAL);
//用火狐打开
ShellExecute(Handle, 'open', '', 'about:blank', nil, SW_SHOWNORMAL);
//用默认浏览器打开
ShellExecute(Handle, 'open', '', 'about:blank', nil, SW_SHOWNORMAL);
end;
//另一种调用IE打开的方法
uses ComObj;
procedure TForm1.Button1Click(Sender: TObject);
uses ComObj;
procedure TForm1.Button1Click(Sender: TObject);
procedure OpenInIE(aURL: string);
var
IE: Variant;
begin
IE := CreateOleObject('InternetExplorer.Application');
IE.Visible := true;
IE.Navigate(aURL);
殷桃的三任丈夫 end;
begin
OpenInIE('u');
end;
var
IE: Variant;
begin
IE := CreateOleObject('InternetExplorer.Application');
IE.Visible := true;
IE.Navigate(aURL);
殷桃的三任丈夫 end;
begin
OpenInIE('u');
end;
//第二种方法可以有更多控制
procedure TForm1.Button1Click(Sender: TObject);
黄立行身高procedure OpenInIE(aURL: string); //need uses ComObj;
var
procedure TForm1.Button1Click(Sender: TObject);
黄立行身高procedure OpenInIE(aURL: string); //need uses ComObj;
var
IE: Variant;
begin
IE := CreateOleObject('InternetExplorer.Application');
IE.Visible := true; //可见
IE.left := 0;
IE.top := 红磷燃烧0;
IE.height := 600; //高度
IE.width := 800; //宽度
IE.menubar := 0; 北京 旅行社//取消菜单栏
IE.addressbar := 0; //取消地址栏
IE.toolbar := 0; //取消工具栏
IE.statusbar := 0童安格近况; //取消状态栏
//IE.resizable := 0; //不允许用户改变窗口大小
IE.Navigate(aURL);
end;
begin
IE := CreateOleObject('InternetExplorer.Application');
IE.Visible := true; //可见
IE.left := 0;
IE.top := 红磷燃烧0;
IE.height := 600; //高度
IE.width := 800; //宽度
IE.menubar := 0; 北京 旅行社//取消菜单栏
IE.addressbar := 0; //取消地址栏
IE.toolbar := 0; //取消工具栏
IE.statusbar := 0童安格近况; //取消状态栏
//IE.resizable := 0; //不允许用户改变窗口大小
IE.Navigate(aURL);
end;
begin
OpenInIE('u');
end;
OpenInIE('u');
end;
发布评论