delphi6.0中
在uses单元里加上 shellapi
在事件中加入:
ShellExecute(handle,nil,pchar('http://free2.e-168.cn/delphi/soft'),nil,nil,SW_shownormal);
代码如下:
unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls,shellapi;
type
TForm1 = class(TForm)
Label1: TLabel;
procedure Label1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
procedure TForm1.Label1Click(Sender: TObject);
begin
ShellExecute(handle,nil,pchar('http://free2.e-168.cn/delphi/soft'),nil,nil,SW_shownormal);
end;
end.