什么delphi命令可以打开网页呢? ShellExecute(Handle, 'open', 'http://www.sina.com', nil, nil, SW_SHOWNORMAL); 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 //pasunit Unit1;interfaceuses 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(Handle, 'OPEN', PChar(TLabel(Sender).Caption), nil, nil, SW_NORMAL);end;end.//dfmobject 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 Cursor = crHandPoint Caption = 'http://www.csdn.net' OnMouseDown = Label1MouseDown OnMouseEnter = Label2MouseEnter OnMouseLeave = Label2MouseLeave end object Label2: TLabel Left = 8 Top = 104 Width = 104 Height = 13 Cursor = crHandPoint Caption = 'http://www.sohu.com' OnMouseDown = Label1MouseDown OnMouseEnter = Label2MouseEnter OnMouseLeave = Label2MouseLeave endend ShellExecute(Handle, 'OPEN', PChar(TLabel(Sender).Caption), nil, nil, SW_NORMAL);不能执行。是什么问题。use项已经设定。windowsxp+delphi6 递归遍历网页元素,请教! delphi如何读取CH375WriteData()数据! Delphi图片资源释放问题,高手请进! 请问这个问题怎么解决? 我们常常看到的__象在输入框(edit)点击"客户代码"就相应的弹出"客户代码"的界面,是怎么做的? 如何在Delphi6中解除对JDK1.2.2的绑定 Richedit(或者类似控件),如何能实现多列字符串右对齐?每列颜色不同,且嵌有不分列的行。 大家觉得东软怎么样? 外挂程序? 如果制作类似于WINDOWS“开始”菜单的效果? 请问如何复制对象? 如何做像“金山快译”那样的窗体?跑到屏幕最上面,鼠标一指就出来!?thanks
unit Unit1;interfaceuses
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(Handle, '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
Cursor = crHandPoint
Caption = 'http://www.csdn.net'
OnMouseDown = Label1MouseDown
OnMouseEnter = Label2MouseEnter
OnMouseLeave = Label2MouseLeave
end
object Label2: TLabel
Left = 8
Top = 104
Width = 104
Height = 13
Cursor = crHandPoint
Caption = 'http://www.sohu.com'
OnMouseDown = Label1MouseDown
OnMouseEnter = Label2MouseEnter
OnMouseLeave = Label2MouseLeave
end
end