社区
Delphi
帖子详情
怎样实现与网站的链接?
yang_xz
2001-12-06 09:22:51
怎样实现在Form上放一Label,输入网址,程序运行时单击该网址就链接到网站?就象Delphi5的Help中的About上的一样?
...全文
46
1
打赏
收藏
怎样实现与网站的链接?
怎样实现在Form上放一Label,输入网址,程序运行时单击该网址就链接到网站?就象Delphi5的Help中的About上的一样?
复制链接
扫一扫
分享
转发到动态
举报
写回复
配置赞助广告
用AI写文章
1 条
回复
切换为时间正序
请发表友善的回复…
发表回复
打赏红包
王集鹄
2001-12-06
打赏
举报
回复
//pas
unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, ExtCtrls, StdCtrls;
type
TForm1 = class(TForm)
Label1: TLabel;
Label2: TLabel;
procedure Label2MouseEnter(Sender: TObject);
procedure Label2MouseLeave(Sender: TObject);
procedure Label1MouseDown(Sender: TObject; Button: TMouseButton;
Shift: TShiftState; X, Y: Integer);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
uses
ShellApi;
procedure TForm1.Label2MouseEnter(Sender: TObject);
begin
TLabel(Sender).Font.Color := clBlue;
TLabel(Sender).Font.Style := [fsUnderline];
end;
procedure TForm1.Label2MouseLeave(Sender: TObject);
begin
TLabel(Sender).Font.Color := clWindowText;
TLabel(Sender).Font.Style := [];
end;
procedure TForm1.Label1MouseDown(Sender: TObject; Button: TMouseButton;
Shift: TShiftState; X, Y: Integer);
begin
ShellExecute(0, 'OPEN', PChar(TLabel(Sender).Caption), nil, nil, SW_NORMAL);
end;
end.
//dfm
object Form1: TForm1
Left = 192
Top = 107
Width = 544
Height = 375
Caption = 'Form1'
Color = clBtnFace
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'MS Sans Serif'
Font.Style = []
OldCreateOrder = False
PixelsPerInch = 96
TextHeight = 13
object Label1: TLabel
Left = 8
Top = 48
Width = 99
Height = 13
Caption = 'http://www.csdn.net'
OnMouseDown = Label1MouseDown
OnMouseEnter = Label2MouseEnter
OnMouseLeave = Label2MouseLeave
end
object Label2: TLabel
Left = 8
Top = 104
Width = 104
Height = 13
Caption = 'http://www.sohu.com'
OnMouseDown = Label1MouseDown
OnMouseEnter = Label2MouseEnter
OnMouseLeave = Label2MouseLeave
end
end
js如何
实现
复制
链接
?
js如何
实现
复制
链接
?
Python爬虫如何
实现
抓取电影
网站
?Python爬虫如何对电影
网站
信息进行爬取?
很多小伙伴在学习了爬虫之后都能够使用它去抓取一些网页上的数据了,但是对于一个
网站
的爬取还是有些问题存在的,所以这一篇文章将会以实际的代码示例来介绍Python爬虫如何
实现
抓取电影
网站
?1、我们在使用爬虫对...
如何简单快速地
实现
深度
链接
?
用户在浏览器中打开点击深度
链接
时,可以
实现
网页到应用之间的无缝切换,并可以通过携带参数,
实现
直达应用的指定场景页面的功能。 如何
实现
从网页启动APP? 不同于常见的URL中http://开头的协议,深度
链接
的...
【华为OD技术面试官百问百答】shared_ptr
实现
的底层机制?vector和deque的区别?编译原理,动态
链接
和静态
链接
有什么区别?
1. shared_ptr
实现
的底层机制是什么?如何
实现
的? 会有那些问题?...6. C++ 程序内存布局是怎么样的?堆和栈有什么区别?栈和堆各有什么优缺点?栈空间大小? 7. 2 GB 内存的操作系统中,可以分配 4 GB 的数
如何做到推广
链接
的落地页
链接
实现
无变化跳转?
传统的跳转功能是当您访问A
链接
时候,打开后会根据条件是否显示B
链接
,以达到针对不同访客显示不同的内容的目的,但有一个缺点,就是跳转后的B
链接
和跳转前的A
链接
url不一致, 导致访客体检不佳,如果是推广账户则...
Delphi
5,388
社区成员
262,730
社区内容
发帖
与我相关
我的任务
Delphi
Delphi 开发及应用
复制链接
扫一扫
分享
社区描述
Delphi 开发及应用
社区管理员
加入社区
获取链接或二维码
近7日
近30日
至今
加载中
查看更多榜单
社区公告
暂无公告
试试用AI创作助手写篇文章吧
+ 用AI写文章