1个回答
展开全部
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.
在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.
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询