Delphi打开网址链接的几种方法
2014-07-27 17:41
225 查看
Delphi打开网址链接的几种方法
:
1:
用默认浏览器打开,
uses shellapi
procedure TForm1.Button2Click(Sender: TObject);
begin
ShellExecut(Application.Handle, nil, 'http://cy03wqh.blog.163.com', nil, nil, SW_SHOWNORMAL);
end;
2:
用IE浏览器打开的3种方法:
{uses shellapi}
procedure TForm1.Button1Click(Sender: TObject);
begin
ShellExecute(Application.Handle, 'open','Iexplore.exe','http://cy03wqh.blog.163.com',nil,SW_SHOWNORMAL);
end;
procedure TForm1.Button2Click(Sender: TObject);
begin
ShellExecute(Application.Handle, nil, 'http://cy03wqh.blog.163.com', nil, nil, SW_SHOWNORMAL);
end;
//
uses SHDocVw;
procedure TForm1.Button4Click(Sender: TObject);
var
IE : OleVariant;
begin
IE := CoInternetExplorer.Create;
IE.Visible := True;
IE.Navigate2('http://cy03wqh.blog.163.com');
end;
3:
comobj
procedure TForm1.Button1Click(Sender: TObject);
procedure OpenInIe(URL:string);
var
Ie:Variant;
begin
Ie:=CreateOleObject('InternetExplorer.Application');
Ie.visible:=True;
Ie.left:=300;
Ie.top:=200;
Ie.height:=400;
Ie.width:=600;
Ie.menubar:=0; //隐藏菜单栏
Ie.toolbar:=0; //隐藏工具栏
Ie.addressbar:=0; //隐藏地址栏
//
Ie.statubar:=0; //不可调整大小
Ie.resizable:=0;
Ie.navigate(URL);
end;
begin
OpenInIe('http://cy03wqh.blog.163.com');
end;
4:用
WebBrowser控件
procedure TForm1.FormCreate(Sender: TObject);
begin
WebBrowser1.Align := alTop;
WebBrowser1.Navigate('http://cy03wqh.blog.163.com');
:
1:
用默认浏览器打开,
uses shellapi
procedure TForm1.Button2Click(Sender: TObject);
begin
ShellExecut(Application.Handle, nil, 'http://cy03wqh.blog.163.com', nil, nil, SW_SHOWNORMAL);
end;
2:
用IE浏览器打开的3种方法:
{uses shellapi}
procedure TForm1.Button1Click(Sender: TObject);
begin
ShellExecute(Application.Handle, 'open','Iexplore.exe','http://cy03wqh.blog.163.com',nil,SW_SHOWNORMAL);
end;
procedure TForm1.Button2Click(Sender: TObject);
begin
ShellExecute(Application.Handle, nil, 'http://cy03wqh.blog.163.com', nil, nil, SW_SHOWNORMAL);
end;
//
uses SHDocVw;
procedure TForm1.Button4Click(Sender: TObject);
var
IE : OleVariant;
begin
IE := CoInternetExplorer.Create;
IE.Visible := True;
IE.Navigate2('http://cy03wqh.blog.163.com');
end;
3:
comobj
procedure TForm1.Button1Click(Sender: TObject);
procedure OpenInIe(URL:string);
var
Ie:Variant;
begin
Ie:=CreateOleObject('InternetExplorer.Application');
Ie.visible:=True;
Ie.left:=300;
Ie.top:=200;
Ie.height:=400;
Ie.width:=600;
Ie.menubar:=0; //隐藏菜单栏
Ie.toolbar:=0; //隐藏工具栏
Ie.addressbar:=0; //隐藏地址栏
//
Ie.statubar:=0; //不可调整大小
Ie.resizable:=0;
Ie.navigate(URL);
end;
begin
OpenInIe('http://cy03wqh.blog.163.com');
end;
4:用
WebBrowser控件
procedure TForm1.FormCreate(Sender: TObject);
begin
WebBrowser1.Align := alTop;
WebBrowser1.Navigate('http://cy03wqh.blog.163.com');
相关文章推荐
- 2015.1.25 Delphi打开网址链接的几种方法
- Delphi打开网址链接的几种方法
- Delphi打开网址链接的几种方法
- Delphi实现判断网址是否存在及是否可以打开的方法
- Delphi中打开网页连接的几种方法
- Delphi中打开网页连接的几种方法
- 一个链接按两种方式打开两个网址的方法
- Delphi中打开网页连接的几种方法
- Pyqt 打开外部链接的几种方法
- 一个链接按两种方式打开两个网址的方法
- IE无法打开链接的处理方法
- 非中文操作系统下正常打开有中文链接的CHM文件解决方法!!!
- 打开新页面的几种方法(随时更新)
- 几种收藏网址的常用方法
- ASP.NET 打开新窗口几种方法
- VB打开CHM文件的几种方法
- 打开新窗口链接的几种办法
- [转]IE点击链接没有反应或打开新窗口出现一个空白框(地址栏空白)的解决方法
- a href=#与 a href=javascript:void(0) 的区别 打开新窗口链接的几种办法
- 不使用 java.awt.Desktop API,打开默认浏览器访问指定链接的方法