Пример приложенич

Рисунок #5: Пример приложения
unit Unit1;
interface
uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
StdCtrls, ShellAPI;
type
TForm1 = class(TForm)
URLLabel: TLabel;
Button1: TButton;
procedure Button1Click(Sender: TObject);
procedure URLLabelClick(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.DFM}
procedure TForm1.Button1Click(Sender: TObject);
begin
Close;
end;
procedure TForm1.URLLabelClick(Sender: TObject);
Const
URL : String = 'http://www.sources.ru';
begin
ShellExecute(0,'open',pChar(URL),NIL,NIL,SW_SHOWNORMAL);
end;
end.
Листинг #1: unit1.pas - Пример приложения |